Category: PHP 7.4
-
Post Views: 20 1. Execute the Composer Update in Homestead and report an error: Your requirements could not be resolved to an installable set of packages. The reason is that the PHP version is 8.0 , and the version of the package depends on 7. as shown in Figure 1 2. Reference:https://learnku.com/docs/laravel/5.8/homestead/3882#multiple-php-versions. Homestead 6 introduced support for multiple PHP versions…
-
Post Views: 13 1. Error in PHP 7.4: Illegal offset type in issue or empty. as shown in Figure 1 2. The code is as follows: 3. Print $setting, its value is the object. as shown in Figure 2 4. will $setting[‘settingId’]Convert to string. 5. The value of the printed and converted string is as follows 6. No more errors.
-
Post Views: 17 1. The value of the string: E:\wwwroot\object\storage\app/theme_dow nloads/2022/05/25/1653468314.0994.1295326141.zip 2. Values of other characters: E:\wwwroot\object\storage\app/ 3. The code is implemented as follows 4. Results: _downloads/2022/05/25/1653468314.0994.1295326141.zip. Expected is: Theme_Downloads/2022/05/25/1653468314.0994.1295326141.zip. as shown in Figure 1 5. The code implementation is adjusted as follows, remove the last / of the values of other characters 6. The results are in line with…
-
Post Views: 17 1. Reference:https://www.shuijingwanwq.com/2022/06/10/6593/, based on Togos/phpGitIgnore for parsing and applying .gitignore class rules implementation 2. Now expect that the /css, /images, /js, /locales, webpack.mix.js and other files in the /assets/apps/ directory should be ignored. The current configuration is as follows. as shown in Figure 1 3. This stage has not been ignored. For example: /apps/object/backtop/js/backtop.jsx, which should be…
-
Post Views: 16 1. In a template directory, because there are some files that need to be ignored, it is also written into the table, so it needs to be filtered out. Reference: In Laravle 6, togos/phpgitignore, implementation for parsing and applying .gitignore class rules 2. The current code implementation 3. The result is for example: the file starting with…
-
Post Views: 18 1. There is a folder at this stage, which contains a configuration file similar to .gitignore: .themeignore, the content is as follows 2. You need to ignore some files based on this file configuration, and only include the required files. For example: filter out node_modules/* . as shown in Figure 1 3. Install togos/gitignore based on composer…
-
Post Views: 20 1. Reference:https://www.php.net/manual/zh/ziparchive.extractto.php. ZipArchive::ExtractTo. Extract the compressed file to the specified directory. as shown in Figure 1 2. The final reference implementation is as follows 3. The decompressed directory structure is the same as the original file name and the same name. as shown in Figure 2
-
Post Views: 16 1. The performance of the web page is that when the request parameter is input:\, the response is 200, which in turn causes the response to 500 when the template is rendered. as shown in Figure 1 2. View the corresponding logs in the Alibaba Cloud Log Service SLS, and report an error when parsing the JSON…
-
Post Views: 20 1. Check the existing implementation code as follows: 2. Check the print results before and after the multidimensional array index. Use the value of the name column in the array as the new key. as shown in Figure 1 3. However, just using the function array_column is enough to achieve. When column_key is null, the entire array…
-
Post Views: 16 1. When basename: “collections”, the decoding is successful. as shown in Figure 1 2. Decoding fails when basename: “CollectionTitem” is used. as shown in Figure 2 3. View the code implementation of the decoding 4. First analyze the successful process and print JSON_LAST_ERROR() 5. Re-analyze the failed process, print JSON_LAST_ERROR(), where the value of one failure is…