Category: Yii
-
Post Views: 13 1. Configuration file: \common\config\params-local.php, self-media as the source 2. Create a new service class, \Common\Services\AssetService.php to implement a static method: CopyAssets 3. Reference the service class, \common\services\AssetService.php, call the static method: CopyAssets 4. After running the method, print out $AssetServiceResult 5. Check the copied directory and files, which are in line with expectations, as shown in Figure…
-
Post Views: 13 1. Posthttp://api.channel-pub-api.localhost/qq/v1/articles?group_id=015ce30b116ce86058fa6ab4fea4ac63, as shown in Figure 1 Print request parameters: 2. Posthttp://api.channel-pub-api.localhost/qq/v1/articles?group_id=015ce30b116ce86058fa6ab4fea4ac63, the request parameter UUID is the array format, as shown in Figure 2 Print request parameters: 3. Check \QQ\RESTS\Article\CreateAction.php, when the value of UUID is a single string, it is filled with the verification code 4. Reference URL:https://www.yiiframework.com/doc/guide/2.0/zh-cn/input-tabular-input, edit \QQ\RESTS\Article\CreateAction.php, when the value of UUID…
-
Post Views: 15 1. In the ALL option for configuring your application, there is no Yii2 framework, only PHP can be selected, as shown in Figure 1 2. Install PHP integration for Sentry. The recommended method is to use composer, but decided not to use this scheme for the time being, as shown in Figure 2 3. Search yii2…
-
Post Views: 12 1. When the value of locale is set to english (us), the editor will display normally, but the corresponding language package file /assets/5fbb6f5a/lang/en.js response 404, as shown in Figure 1 2. When the local value is set to Simplified Chinese, when the article is created, the editor is not displayed normally, as shown in Figure 2 3.…
-
Post Views: 13 1. There are 3 applications in the directory structure at this stage, namely: Frontend, Backend, and API, and their domain names are configured as :http://www.channel-pub-api.localhost/,http://www.channel-pub-api.localhost/backend,http://www.channel-pub-api.localhost/api 2. Edit the hosts file 3. Reference:https://github.com/mickgeek/yii2-advanced-one-domain-config/blob/master/vhosts/nginx.conf, edit \frontend\config\main.php 4. Edit \backend\config\main.php, set the baseURL, separate session and cookie 5. Edit \api\config\main.php 6. Edit \api\config\urlmanager.php 7. Edit \environments\dev\frontend\web\robots.txt, \environments\prod\frontend\web\robots.txt Before editing: After…
-
Post Views: 29 1. Implement the corresponding RESTful-style web service API of the page in the API directory, and then adjust it to the RPC client 2. After all the corresponding APIs of the page are implemented, the POST request is executed in Postman, and the response is normal, as shown in Figure 1 3. Execute the PUT /pages/1 request…
-
Post Views: 15 1. Supervisor is a small system that can manage and monitor various processes in UNIX-like systems. The configuration file of supervisor is a Windows-ini style (Python ConfigParser) file. 2. The program configuration item of the configuration file of Supervisor 3. Create a new \build\c_files\etc\supervisord.d\yii-task-submit.ini, as shown in Figure 1 4. StopWaitSecs, after the program sends a stop…