永夜 Blog

使用 Composer 从 Yii 2.0.x 升级时,报错: [ErrorException] Undefined variable: nameMatchesRequiredPackage 0

When using Composer to upgrade from Yii 2.0.x, an error is reported:[ErrorException]Undefined variable: The analysis solution of nameMatchesRequiredPackage

浏览量: 43 1. When using Composer to upgrade from Yii 2.0.x, an error is reported:[ErrorException]undefined variable: nameMatchesRequiredPackage, as shown in Figure 1 2. Update 3 packages, first update the first 2, no errors are...

在 Windows PowerShell 中执行命令:curl -X POST --data,报错:Invoke-WebRequest : 找不到接受实际参数“POST”的位置形式参数。 0

Execute the command in Windows PowerShell: curl -x POST –data, and report an error: invoke-webrequest : The location formal parameter that accepts the actual parameter “post” cannot be found. analysis solution

浏览量: 87 1. Execute the command in Windows PowerShell: curl -x POST –data, report an error: invoke-webrequest : The location formal parameter that accepts the actual parameter “post” cannot be found. as shown in...

HttpException 表示由最终用户的不正确请求导致的异常 0

Chinese translation and annotation of predefined HTTP exception classes for Yii 2.0 (reference: MDN, Wikipedia)

浏览量: 48 1. Yii\Web\BadRequestHttpException: status code 400. BadRequestHttpExceptions a “bad request” Http exception with status code 400. Use this exception to represent a generic client error. Describes the error. In that case, consider using...

0

In Yii2 advanced template, the task is implemented asynchronously based on the Yii2 queue extension, and the additional event handler is attached, after each successful execution of the job, when an exception occurs during the job execution.

浏览量: 54 1. By configuring the additional event processor, edit \environments\dev\common\config\main-local.php, \environments\prod\common\config\main-local.php, as shown in Figure 1 2. Edit \QQ\RESTS\QQ_CW_APP\IndexAction.php, an entry of a push queue 3. Edit \Common\Services\AssetService.php, copy the source resource file...

执行数据库迁移,查看表结构,基于 Gii 重新生成模型文件 0

Based on yiisoft/yii2-app-advanced, create a new repository yii2-app-advanced on github, the implementation of uuid

浏览量: 22 1. Search for yii2 UUID on github and select warron/yii2-uuid, as shown in Figure 1 2. Based on the composer installation, an error is reported 3. Based on the Composer installation, the...

在浏览器打开网址:http://api.channel-pub-api.localhost/qq/v1/oauth2/authorize?group_id=015ce30b116ce86058fa6ab4fea4ac63 ,响应 HTML 格式,符合预期 0

In Yii 2, when processing a RESTful API request, the new response format is supported: text/html, and only the HTML format is supported

浏览量: 44 1. Open the URL in the browser: http://api.channel-pub-api.localhost/qq/v1/OA uth2/authorize?group_id=015ce30b116ce86058fa6ab4fea4ac63 , which responds to the XML format, because RESTful APIs support both JSON and XML formats. But HTML format is not supported. as...