Category: Web Application Development
-
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…
-
Post Views: 44 1. In the local environment, post in postman , http://api.aims-api.localhost/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , the response is successful 2. In development environment, post in postman , http://wjdev2.chinamcloud.com:8659/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , the response failed, as shown in Figure 2 3. Edit the Dockerfile of the interface (RPC client), and delete the passthru in disable_functions 4. Edit the Dockerfile of the RPC server and…
-
Post Views: 29 1. The API can distinguish application/x-www-form-urlencoded and multipart/form-data input formats by default, and view \api\config\main.php, request Configuration of application components 2. POST request in Postman,http://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users, the input format: application/x-www-form-urlencoded, as shown in Figure 1 3. Post request in Postman,http://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users, input format: multipart/form-data, as shown in Figure 2 4. Post request in Postman,http://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users, the input format: application/json, data…
-
Post Views: 14 1. Dynamic configuration of database connection in Yii 2 Starter Kit, the configuration attribute comes from the multi-tenant system,https://www.shuijingwanwq.com/2018/01/18/2328/, multi-tenant physical isolation implementation 2. In the public cloud, the system should serve multiple tenants at the same time, and multiple tenants share a database. Therefore, it is necessary to realize the logical isolation of multi-tenancy, that is,…