Godaddy主機修改上傳文件限制

godaddy虛擬主機上傳文件有限制,限制為8M。可以通過改php.ini文件。
默認會有一個php.ini文件,但是改來改去不生效,最后把php.ini重命名為php5.ini,《《你的主機如果是godaddy主機,php版本默認是5,需要php5.ini,你自己可以在根目錄新建一個。記得要備份啊,另外修改后稍微等2到10分鐘,等待服務器生效。》》發現生效了。
只需要添加三行代碼:

upload_tmp_dir = /tmp
upload_max_filesize = 100M
post_max_size = 100M

修改前建議備份,如果那里錯了,可以恢復。另外好像修改后大概等2-10分鐘內生效,我把上傳值修改為100M。
另外如果修改錯誤,我附上一php.ini的備份文件吧!

register_globals = off
allow_url_fopen = off

expose_php = Off
max_input_time = 60
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

; Only uncomment zend optimizer lines if your application requires Zend Optimizer support

;[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so

; -- Be very careful to not to disable a function which might be needed!
; -- Uncomment the following lines to increase the security of your PHP site.

;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
;		      phpinfo, exec, system, dl, fsockopen, set_time_limit,
;                     popen, proc_open, proc_nice,shell_exec,show_source,symlink"

 
  • 本文由 米粒在線 發表于 2012年11月2日14:42:06
  • 轉載請務必保留本文鏈接:http://m.bjmhhq.com/781.html

發表評論

匿名網友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
確定

拖動滑塊以完成驗證