Category: Programming Language
-
Post Views: 19 1. When deleting the table in MySQL, an error is reported: 1217 – Cannot delete or update a parent row: a foreign key constraaint fail. as shown in Figure 1 2. Reference:You can get information about foreign keys from information_schema.key_column_usagetable. The query example for that table is shown here . as shown in Figure 2 3. The…
-
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: 155 1. There is a Shopify PHP application, which can already be previewed in the development environment. as shown in Figure 1 2. Now it is ready to be deployed to the production environment. Shopify recommends creating a separate application if you need to deploy the application to the production environment. This application shares the code base with…