国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > 建站經驗 > 正文

php環(huán)境上傳大文件需要注意的!事項

2019-11-02 14:55:45
字體:
來源:轉載
供稿:網(wǎng)友

 公共的環(huán)境前段


<form enctype="multipart/form-data" action="upload.php" method="POST"> 
<!-- MAX_FILE_SIZE must precede the file input field --> 
<input type="hidden" name="MAX_FILE_SIZE" value="100000000" /> 
<!-- Name of input element determines name in $_FILES array --> 
Send this file: <input name="userfile" type="file" /> 
<input type="submit" value="Send File" /> 
</form>

nginx+linux環(huán)境注意事項


php環(huán)境上傳大文件需要注意的事項:

野兔影院[www.aikan.tv/special/yetuyingyuan/]

/usr/local/php/etc/php-fpm.conf.default
request_terminate_timeout = 0   //這個是fastcgi的執(zhí)行時間,默認不限制的
client_max_body_size 256m;

fastcgi_buffer_size 256k;
fastcgi_buffers 16 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
    
fastcgi_connect_timeout 3000;
fastcgi_send_timeout 3000;
fastcgi_read_timeout 3000;

另外PHP也需要配置:

memory_limit 512M
max_execution_time 0
post_max_size 256M
upload_max_filesize 256M


apache+windows環(huán)境下注意事項

配置php.ini文件 (以上傳500M以下大小的文件為例) 
查找以下選項并修改-> 
file_uploads = On ;打開文件上傳選項 
upload_max_filesize = 500M ;上傳文件上限


如果要上傳比較大的文件,僅僅以上兩條還不夠,必須把服務器緩存上限調大,把腳本最大執(zhí)行時間變長 
post_max_size = 500M ;post上限 
max_execution_time = 1800 ; Maximum execution time of each script, in seconds腳本最大執(zhí)行時間 
max_input_time = 1800 ; Maximum amount of time each script may spend parsing request data 
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)內存上限

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 马尔康县| 南宁市| 云浮市| 万全县| 澄江县| 黑山县| 沙坪坝区| 龙江县| 仁寿县| 左云县| 成武县| 宣汉县| 临汾市| 凤山县| 略阳县| 白朗县| 宜良县| 彭州市| 始兴县| 阿克苏市| 七台河市| 清丰县| 阿克| 册亨县| 高州市| 宁波市| 洛阳市| 镇康县| 卢龙县| 赤城县| 东莞市| 乡城县| 渭南市| 阿坝县| 宣城市| 疏勒县| 友谊县| 海宁市| 古田县| 楚雄市| 大埔县|