修改php的上传限制

Sep 27th, 2006

一般php都是限制2兆的文件上传和 8兆的内存使用, 可以通过修改php.ini文件来解除限制。我使用的是windows版本的php5(apacha2的环境), 修改方法如下:
找到 c盘 windows目录下面的 php.ini 文件搜索下面字段:

; Maximum size of POST data that PHP will accept.<br/>post_max_size = 2M




继续搜索下面字段



; Maximum allowed size for uploaded files.<br/>upload_max_filesize = 2M



将上面两个2M改成你想要地大小。修改后保存, 然后重新启动apach,就可以上传大的东西了。

有些论坛或者博客系统可能需要修改数据库字段或者用户权限, 这个就需要自己来改了。

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Fleck
  • Gwar
  • Haohao
  • Identi.ca
  • laaik.it
  • LinkaGoGo
  • LinkedIn
  • Linkter
  • Live
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MySpace
  • PDF
  • Ping.fm
  • RSS
  • Slashdot
  • Socialogs
  • Technorati
  • Tumblr
  • Twitter
  • Twitthis
  • Webride
  • Yahoo! Bookmarks
  • Yigg
Tags: ,
  1. 忘了
    Jan 7th, 2007 at 16:10
    Reply | Quote | #1

    “我使用的是windows版本的php5(apacha2的环境)”这是一种系统吗?它跟WindowsXP有什么关连啊?[emot]20[/emot]

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).