Tag: fopen
-
Post Views: 63 1. Error: class “vtifulkernelexcel” not found. 2. The reason is that the extension php-ext-xlswriter is not installed. 3. GitHub Release: https://github.com/viest/php-ext-xlswriter/releases download php-windows-xlswriter-cf7e1933-8.1-ts-vs16-x64.zip. as shown in Figure 1 4. After decompression, copy php_xlswriter.dll to C:php-8.1.27extphp_xlswriter.dll 5. Edit php.ini, add extension=xlswriter 6. After restarting php, the error is reported again:[ERROR]workbook_close(): error creatingE:WWWRootObjectStorageAppExport/Order/Order Export Task 2024-02-19 10:24:06.xls. error =…
-
Post Views: 17 1. When requesting the S3 bucket, you have encountered a current limit problem: Please reduce your request rate, which leads to the failure of the request. as shown in Figure 1 2. The final implementation code is as follows 3. Open the CDN address corresponding to S3 in the browser:https://xxx.cloudfastin.com/static/xxx/98cb73f9-e61a-40b1-a27a-3beb99015e5e/assets.zip. The file can be downloaded, and confirm…
-
Post Views: 19 1. Now trying to download the remote zip file to the server. Remote file URL:https://www.shuijingwanwq.com/wp-content/uploads/2021/07/两位老人被两只狗给撞了.wmv 2. Reference:https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html#sink. Declare the body part where the response will be saved. as shown in Figure 1 3. Reference:https://www.shuijingwanwq.com/2020/11/26/4627/. The resources returned by fopen() will be written to the PHP stream in response 4. Throw an exception: fopen(e:\wwwroot\object\storage/theme_down loads/2022/05/19/1652927525.7561.1655422634.zip): Failed to open…
-
Post Views: 16 1. Reference URL:https://www.shuijingwanwq.com/2021/08/10/5155/. In PHP, the size of the file is detected based on the HTTP protocol (that is, the size of the remote file is obtained without downloading the file), the previous implementation, using the file system function fopen – open the file or the URL. If the URL of the file requires a 301 jump,…
-
Post Views: 22 1. In the process of realizing the channel release, there is a situation where the files to be uploaded to the channel are too large, which leads to the failure of the upload. For example, Douyin, which is temporarily limited to 128 MB. as shown in Figure 1 2. However, the implementation logic at this stage is…
-
Post Views: 12 1. Now it has been implemented: Copy the resource file of the source to the resource directory published by the channel, and return the relative path (sync). The code is as follows 2. Now it needs to be adjusted and can be realized again: download the file and save it as a specific file name, rather than…