Category: Web Framework
-
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…
-
Post Views: 14 1. The requirements put forward by the new colleagues are required to realize the following requirements: (1) Logged in, desktop \api\rests\resource Modified to: \API\RESTS\PLAN_TASK_RESOURCE (2) Tourists, do not make changes \API\RESTS\CLIENT_RESOURCE (3) Logged in, mobile terminal Task Management – Delete Task Materials Task Management – Manage background material list \API\RESTS\MOBILE\PLAN_TASK_RESOURCE (4) Logged in, mobile terminal /v1/mobile/resources/resource material…
-
Post Views: 14 1. Open the desktop application terminal, the interface, as shown in Figure 1 2. Interface: my topic selection (get a list of topics), the response structure in postman, as shown in Figure 2 3. Prototype design on the mobile application side, as shown in Figure 3 4. At this stage: the subsequent iterative development stage, the desktop…
-
Post Views: 15 1. The data structure of the A table, as shown in Figure 1 2. The data structure of the B table, as shown in Figure 2 3. The current requirement is that 8 fields in the A table need to be queried, inserted into the B table, and the following commands are used to create a new…
-
Post Views: 46 1. Execute the command and report an error: php warning: strpos(): empty needle in E:\WWWRoot\PCS-API\Vendor\yiisoft\yii2\log\target.php on line 243, as shown in Figure 1 2. View \console\runtime\logs\app.log 3. Edit on the command line 4. Edit on the command line. Once an exception is thrown in the console command line, when writing to the log, an error will be…
-
Post Views: 11 1. Column configuration: pa_config_column, as shown in Figure 1 2. Column staff configuration: PA_CONFIG_COLUMN_USER, as shown in Figure 2 3. Topic: PA_plan, as shown in Figure 3 4. Topic selection task: PA_PLAN_TASK, as shown in Figure 4 5. Task management – my task, query rules (1) The tenant ID of the task is the tenant ID of…
-
Post Views: 40 1. In Postman, posthttp://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users201 response, the status value is 1 by default 2. In Postman, deletehttp://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users/1, 200 responses 3. In Postman, posthttp://api.github-shuijingwan-yii2-app-advanced.localhost/v1/users,422 response, not as expected, expected to be 201 response, because “username”: “111111” has been deleted 4. Create a new \console\migrations\m180925_054952_add_is_deleted_and_deleted_at_to_user.php. Update field, status, status, 0: disabled; 1: enabled, default: 1. Added field, is_deleted, whether it…
-
Post Views: 49 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 reported, and then update the third one, the error is reported, the search dependency package in the current project Bower-asset/jQuery.inputMask, does not exist, as shown…