Tag: file_exists
-
Post Views: 20 1. Decide to simulate the case of using file_put_contents() to write the same path file in the test environment at the same time, and then observe whether the read file content is empty. require.php 2. Since it is only temporarily used, the product type can be deducted from the resource package by quantity, and the experience version…
-
Post Views: 21 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: 14 1. Configuration file: \common\config\params-local.php, self-media as the source 2. Create a new service class, \Common\Services\AssetService.php to implement a static method: CopyAssets 3. Reference the service class, \common\services\AssetService.php, call the static method: CopyAssets 4. After running the method, print out $AssetServiceResult 5. Check the copied directory and files, which are in line with expectations, as shown in Figure…
