Category: PHP 7.4
-
Post Views: 27 1. Error in PHP 7.4: ErrorException array_key_exists() expects parameter 2 to be array, int give. as shown in Figure 1 2. The code is implemented as follows, the reason is that require($this->getCachePath()) returns 1, and the root of the return 1 is the path $this->getCachePath() The content in the represented file is empty. 3. In fact, when…
-
Post Views: 19 1. FilemTime(): stat failed for /var/www/object/storage/app/theme_downloads/2023/07/19/16 89733510.7774.265283535/migrations/migrate_cart.blade.php . as shown in Figure 1 2. The code is implemented as follows 3. Try setting $PATH to a file path that does not exist. Test in the local environment. Error: warning: filemTime(): stat failed for somefile.txt in e:\wwwroot\phpinfo.php on line 7. Therefore, it is necessary to ensure that the…
-
Post Views: 18 1. When executing array_diff in PHP 7.4 — when calculating the difference set of the array, an error is reported: Object of class theme version could not be converted to string. as shown in Figure 1 2. The code is implemented as follows, and print the two arrays of comparisons respectively 3. Adjust to array_udiff — Use…
-
Post Views: 19 1. Reference:In PHP 7.4, the script files in the directory are executed one by one based on the directory name of the semantic version 2. Now there is a need to no longer use semantic versions as directory names. When the directory name is out of control, the directory list may appear as follows: CUSTOM_MOBILE_LAYOUT_2 , p333,…
-
Post Views: 18 1. Report an error in PHP 7.4: mkdir(): file exists. as shown in Figure 1 2. However, in the code implementation, it is first judged that the directory does not exist before executing mkdir(). But at the time of execution, the directory already exists. It should be a problem caused by request concurrency. 3. Reproduce this error…
-
Post Views: 18 1. Error when the program is running: syntax error, unexpected,, expecting]. as shown in Figure 1 2. The code to catch the exception is implemented as follows, and finally find that the exception is not caught 3. Adjust the code implementation, and change the Throwable $E to \Throwable $E. Capture was successful. The log is generated as…
-
Post Views: 28 1. Reference:Based on Alibaba Cloud’s ECS and RDS, the personal blog migration has been upgraded to: Docker (based on budget considerations, ultimately not realized), LNMP (CentOS 7.7, Nginx 1.16, MySQL 5.7, PHP 7.4), the process of HTTPS , the previous environment was based on the automatic installation of OneInstack. PHP version 7.4 is no longer eligible for…