Category: Programming Language
-
Post Views: 12 1. Compatibility goal: adjust the response of the flying flow to the response specification of the body (convert the field type of the non-array to a string), and be backwards compatible Note: If the version of the requested headers does not exist or the version exists and the version is greater than or equal to 2.1, the…
-
Post Views: 14 1. Copy\vendor\yiisoft\yii2\console\controllers\cacheController .php to \console\controllers\luagameteamskillController.php, as shown in Figure 1 2. Rename \console\controllers\luagameteamskillcontroller.php to \console\controllers\luagameteamskillcontroller.php, as shown in Figure 2 3. Modify the namespace to namespace console\controllers;, and the class name is modified to luagameteamskillController, as shown in Figure 3 4. Only keep ActionIndex(), other methods are deleted, as shown in Figure 4 5. In Windows PowerShell,…
-
Post Views: 18 1. Set the lockout time: the current UNIX timestamp + Redis lock timeout time, in seconds (3), edit the file: \common\config\params.php, as shown in Figure 1 2. Get the relevant setting parameters and edit the file: \api\models\redis\gamecategory.php, as shown in Figure 2 3. Get the Redis connection to execute the relevant commands, edit the file: \API\Models\Redis\GameCategory.php, as…
-
Post Views: 15 1. Please refer to the previous blog:https://www.shuijingwanwq.com/en/2016/11/26/10288/ 2. Prepare to implement RESTful web services based on shujujixi 3. Based on the GII generation model on the Frontend application, edit \environments\dev\frontend\config\main-local.php, as shown in Figure 1 4. Execute .\init in Windows PowerShell to overwrite \frontend\config\main-local.php, and set the IP allowed by GII, as shown in Figure 2 5.…
-
Post Views: 52 1. In Windows Powershll, enter the wwwroot directory, as shown in Figure 1 2. Through the Composer installation, run the following commands and install it in the kaiqiu_shujujixi_api directory, as shown in Figure 2 and 3 composer create-project yiisoft/yii2-app-advanced kaiqiu_shujujixi_api 2.0.10 3. Enter kaiqiu_shujujixi_api directory, right-click, select git bash here, as shown in Figure 4 4. Execute…
-
Post Views: 11 1. Open the backend – content – text component – create text block, error: classtrntv\Aceeditor\Aceeditornot found, as shown in Figure 1 2. Edit yii2-starter-kit\vendor\trntv\yii2-file-kit\composer.json, as shown in Figure 2 “autoload”: { “psr-4”: { “trntv\\filekit\”: “” } }, Modified to: “autoload”: { “psr-4”: { “trntv\\filekit\”: “src/” } }, Note: Redefine the mapping from namespace to directory, the directory…
-
Post Views: 13 1. Install yii2-starter-kit under Windows 10 and Nginx 1.10, and run on the command line: php console/yii app/setup, as shown in Figure 1 2. Error: create unique index IDx_article_slug on {{%article}} (slug) …exception: sqlstate[42000]: Syntax error or access Violation: 1071 specific key was too long; max key length is 767 bytes, as shown in Figure 2 Translation:…
-
Post Views: 16 1. The basic implementation of RPC based on HPROSE for PHP 1.5.6 and Yii2.0.7, please refer to the website:https://www.shuijingwanwq.com/2016/03/24/953/ 2. Upgrade yii2 through composer and execute the command:composer update, as shown in Figure 1: 3. Open the URL:http://trade.service.ygt.cm/area/get-area-mobile, the error is reported, as shown in Figure 2: PHP warning – Yii\Base\ErrorException include(e:\wwwroot\service.ygt.cm\vendor\hprose\hprose\src\hprose\yii\server.php): Failed to open Stream: No…
-
Post Views: 14 1. When the debugging session is started, a set of debugger windows will be opened under the main editor window. In the debugger window, it keeps prompting waiting for the connection (netbeans-xdebug), as shown in Figure 1; 2. Analysis and discover the “debugging” tab of the “php” option, the session ID (session ID). Any name of the…
-
Post Views: 13 1. Based on the authorization of WeChat webpage, the nickname obtained: 🌵yangqin🍬✨, as shown in Figure 1: 2. The relevant information of WeChat users obtained, as shown in Figure 2: 3. The first solution, in order to make mysql support the storage of letters, modify the collation as: utf8mb4_general_ci, as shown in Figure 3: 4. The execution…