Category: PHP
-
Post Views: 16 1. Reference URL:https://www.shuijingwanwq.com/2019/08/15/3427/ 2. Update table: field in channel_app_source: The value of Permission is: 3, as shown in Figure 1 3. Based on the database migration command, generate the implementation of a SQL as shown above, edit \console\migrations\m190815_020034_permission.php 4. Execute the database migration command, as shown in Figure 2 5. Check the table: the field in channel_app_source:…
-
Post Views: 13 1. Error in Yii 2.0: Calling unknown method yii2tech\\ar\\softdelete\\softdeleteBehavior::IsTransactional(), as shown in Figure 1 2. Check the code, because the operation of the Redis model uses soft delete (SoftDelete) 3. Edit the code, and use the hard delete (delete) to delete the Redis model 4. Summary: In Yii 2.0, yii2tech\ar\\softdelete\\softdeleteBehavior does not support the soft deletion of…
-
Post Views: 14 1. Docker deployment, when building an image on Jenkins, an error is reported: composer install returned a non-zero code: 255, as shown in Figure 1 2. The code for the failure of the dockerfile to execute the command is as follows 3. Edit Dockerfile, the build is successful, the reason for the visible failure is: composer install…
-
Post Views: 14 1. The number of request parameters is 1136, as shown in Figure 1 2. Error in PHP 7.2: MB_parse_str(): Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. as shown in Figure 2 3. MAX_INPUT_VARS Indicates how many input variables are accepted (limits apply to the $_GET, $_POST and $_COOKIE hyperglobal variables, respectively) The…
-
Post Views: 12 1. Reference URL:https://www.php.net/manual/zh/function.memory-get-usage.php 2. Based on an example of memory_get_usage(), after adjustment, as shown in Figure 1, the code is as follows: 3. The execution result, unset() is effective for reducing the amount of memory actually used by the php script. 4. In Yii 2.0, run the same code, check the memory usage of the debug data,…
-
Post Views: 15 1. In Yii 2.0, an error is reported: “Calling unknown method: API\modules\v1\models\plantask::claimProcess()”, as shown in Figure 1 2. View the \API\modules\v1\models\plantask.php file, the code is as follows 3. To view the \common\logics\plantask.php file, the method ClaimProcess is defined as private (private), and it can only be accessed by the class where it is defined. The code is…
-
Post Views: 17 1. Obtain the topic details interface, the operation permission of the topic includes all the permission buttons of the current user, which can be customized for the mobile terminal 2. Edit method file: \api\rests\plan\viewaction.php, get the controller ID (yii::$app->controller->id), when its route is: /v1/plans/2, its value is: plan, as shown in Figure 1 3. Edit the method…