Category: Programming Language
-
Post Views: 64 1. Create a new warehouse, shuijingwan/yii2-app-advanced, as shown in Figure 1 Yii 2 advanced project template, the template includes four layers: interface (the API to implement the RESTful style web service service), front-end, back-end and console, each of which is a separate YII application. 2. Successfully created the warehouse, as shown in Figure 2 3. Use the…
-
Post Views: 55 1. Install React Developer Tools (Chrome, React Developer Tools) to determine whether the build process is correct, as shown in Figure 1 2. When visiting a React page of a development mode, the icon of this tool will have a red background, as shown in Figure 2 This page is using the development of react. Note that…
-
Post Views: 15 1. On the official website:https://nodejs.org/zh-cn/Download the recommended version: 8.10.0 LTS, as shown in Figure 1 2. Right-click to install, prompt: Windows SmartScreen CanT Be Reached Right Now, click the RUN button, as shown in Figure 2 Windows SmartScreen CanT Be Reached Right Now Check your Internet connection.Windows SmartScreen is unreachable and canT help you decide if this…
-
Post Views: 12 1. Reference URL:https://github.com/yiisoft/yii2-coding-standards, as shown in Figure 1 2. Clone the yiisoft/yii2-coding-standards warehouse, as shown in Figure 2 3. Enter the E:\wwwroot\yii2-coding-standards directory, and execute the installation, as shown in Figure 3 cd .\yii2-coding-standards\ composer install 4. Configure the local PHP interpreter, File | Settings → Languages & Frameworks → PHP → CLI Interpreter drop-down list, as…
-
Post Views: 14 1. Preliminary suspicion is a problem caused by the BOM header, save as the code in EditPlus: UTF-8 + BOM, as shown in Figure 1 2. Execute git commit, the difference: the text is the same, but the file does not match. The following differences are found: encoding method (ASCII, UTF-8 BOM), as shown in Figure 2…
-
Post Views: 17 1. The data structure of HTML is as follows, and now it needs to be extracted: video description. . . . , that is, the data in the first p tag 2. Search on github: yii2 html dom, and finally choose: garyjl/yii2-simple_html_dom, as shown in Figure 1 3. Execute the command: composer require –prefer-dist garyjl/yii2-simple_html_dom “*”, the…
-
Post Views: 16 1. To implement an interface to obtain the list of articles, you need to query the data based on the date control, as shown in Figure 1 2. The configuration of the verification rules is as follows 3. From_created_at, to_created_at are all empty, the verification is passed, as shown in Figure 2 4. Date (DateTime, example: 2017-03-03…
-
Post Views: 14 1. In PHP 7.1 and Yii 2, AR activity records transactions, and the implementation of multiple models needs to be operated at the same time, as shown in Figure 1 2. Test whether the transaction is supported, and let the $this->save() operation fail, and let the $contentDetail->save() operation succeed, the response is as follows, as shown in…
-
Post Views: 12 1. The image is successfully built in Jenkins, as shown in Figure 1 2. Execute the upgrade in Rancher and report an error: sed: -e expression #1, char 36: unknownd option toS, as shown in Figure 2 3. Replace the / in the .sh file with @, as shown in Figure 3 sed -i “s/cmcp_api_cfg_yii_debug/$cmcp_api_cfg_yii_debug/g” /sobey/www/cmcp-api/.env; be…