修改PHP.ini以下设置:
upload_max_filesize = 2M
改为你希望的最大上载文件的大小.

解决方案 »

  1.   

    修改PHP.ini以下设置:
    upload_max_filesize = 2M
    改为你希望的最大上载文件的大小.
      

  2.   

    应该有一个配置文件的
    在apache中,http.conf中有一个文件最大字节的限制
    你在找一下,应该有的
      

  3.   

    leemars(小菜虎) :你说的不好用,这个我早试过了,我都设置为200M了!xinxin1982(新新) :我说的是WINDOWS下的IIS5.0呀感谢两位,谢谢
      

  4.   

    好象在WIN9X下会出现问题,
    你不如自己把程序文件传到一个类UNIX服务器上试好些.
      

  5.   

    修改PHP.ini以下设置:
    upload_max_filesize = 2M
    post_max_size = 8M改为你希望的最大上载文件的大小.
    如果還不行,試試看修改這個 .
    memory_limit = 8M
      

  6.   

    关注!
       我现在也面对这个问题,相关设置有四项,都改了,还是不行,
    现在想用ftp解决了。
      

  7.   

    楼上的,你用FTP解决了吗?我想还是不行,这样的问题有些地方已经解决了,你试试SOHU的邮件吧,我好象没试出来这样的问题如果我们谁解决了这个问题交流一下吧
      

  8.   

    感谢这各对这个问题的注重和热心的解答,谢谢下面是错误提示:
     该页无法显示 
    您要查看的页当前不可用。网站可能遇到技术问题,或者您需要调整浏览器设置。 --------------------------------------------------------------------------------请尝试以下操作:单击刷新按钮,或以后再试。如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。要查看连接设置,请单击工具菜单,然后单击 Internet 选项。在连接选项卡上,单击局域网设置。 这些设置应该与您局域网(LAN)管理员或 Internet 服务提供商(ISP)所提供的相匹配。 
    如果您的网络管理员允许,Microsoft Windows 可以检查您的网络并自动查找网络连接设置。
    如果您希望 Windows 进行查找,
    请单击检测网络设置。 
    某些站点要求 128-位的连接安全性。单击帮助菜单,然后单击关于 Internet Explorer 可以查看您所安装的安全强度。 
    如果您要访问某安全站点,请确保您的安全设置能够支持。请单击工具菜单,然后单击 Internet 选项。在“高级”选项卡上,滚动到“安全”部分,复选 SSL 2.0、SSL 3.0、TLS 1.0、PCT 1.0 设置。 
    单击后退按钮,尝试其他链接。 找不到服务器或发生 DNS 错误
    Internet Explorer  
      

  9.   

    好.就我目前所做的测试来说(我的是Apache):1.只修改upload_max_filesize = 2M,改为upload_max_filesize = 100M
    大于2M的文件能上传了,但是到了某一大小的时候,就不能上传.提示:Warning: Unable to open '' for reading: Permission denied in e:\server\program\apache\htdocs\update\index.php on line 132.经楼上的朋友提示,修改post_max_size = 8M,改为post_max_size = 100M
    上传一RM(7xM).
    最后提示:
    Fatal error: Maximum execution time of 30 seconds exceeded in e:\server\program\apache\htdocs\update\index.php on line 2看见了吧?最后是被时间限制住了.我是在本机上测试的.
      

  10.   

    将时间限制改掉,行不行?
    如果不行的话,建议用ftp吧...
      

  11.   

    一按就出错啊?
    传小的文件有没有事?实在不行,只好FTP了..呵呵.
      

  12.   

    真不明白为什么~!!!为什么在上传文件这个问题上,我从来没遇到过你们这些问题多么大的东西,随便传,只要网速允许linux,win2000,都没问题。。哎~!!!!!!!!!其实就是改那么几个地方。
    怎么可能不行呢???????????
      

  13.   

    有时可以,有时不行...
    我刚刚传了一个2m的东东,但是,过一会儿就传不来了...停止响应一样..
    唉...
    用ftp吧..
      

  14.   

    楼上的,我觉得IIS对PHP的支持不够好,所以难免会有这样那样的问题.楼上再楼上的,我这里很正常,只是受了时间限制.如果你是用IIS的,请把你的经验告诉大家.如果你是用APACHE的,我也一样没问题.
      

  15.   

    修改php.ini(注意先用phpinfo察看php.ini位置)
    1.upload_max_filesize=10M
    2.max_execution_time=700
    3.memory_limit=15M我用copy和move_uploaded_file上傳一個8M的文件,試了三次,都成功了
      

  16.   

    php.ini文件的配置和上面说的差不多,把最大上传文件修改就好了。
    上传的方法有两种:
    1.copy
    2.ftp
    用copy传送小文件还可以,但是传送大文件,如100M的就不行了。
    具体做法,参考php的帮助文件。
    首先连接ftp地址。
    然后将文件及路径输入就可以传送了。
      

  17.   

    zzgl(昊) :用PHP写FTP上传我早已经会了,可是别忘了,提交一个FILE表单时是要先把文件上传到服务器的临时目录中的,所以还是有大文件上传的问题呀!
      

  18.   

    wasy(嘻嘻哈哈) :请问move_uploaded_file是什么样的方法呀,能说详细点儿吗?谢谢!
      

  19.   

    LeeMaRS(小菜虎) :谢谢你的多次解答我了解到APACHE在WIN32中有很多已知的问题,所以一般情况下是不会采用WIN2000+APACHE的APACHE在WIN32下有如下警告:APACHE的WIN32发布版本仍旧应该看作是测试(BETA)质量的代码,它不符合UNIX发布版本在稳定性和安全性上的正常标准。尚有许多已知的错误(BUG)和不一致性。在APACHE的WIN32版本中存在安全漏洞的可能性也很大。
      

  20.   

    好象可有一个函数可用来设置程序执行的时间,好象是SET_MAXTIME(),使用这个函数可以解决上传超时的问题,要上传大文件,我建议使用PERL程序.我从前也碰到过一样的问题.
      

  21.   

    cf_journey(陶醉):已经设置了,还是不好用呀还有呀,整个程序都是用PHP来开发的,是不可能再允许其它的开发语言介入的,除了JAVASCRIPT呀。
      

  22.   

    move_uploaded_file的用法和copy一樣
    不同的是前者祇能上傳用post方法上傳的文件
    用is_uploaded_file可以判斷上傳文件是否通過post方法
      

  23.   

    to peakcn() : 我个人觉得IIS的漏洞比APACHE要多得多:)不过安全方面,我也不是很在行的.
      

  24.   

    leemars(小菜虎) :你的说法我同意
      

  25.   

    如果想靠传统的PHP上传方法,肯定不行的了.
      

  26.   

    move_uploaded_file
    (PHP 4 >= 4.0.3)move_uploaded_file -- Moves an uploaded file to a new location
    Description
    bool move_uploaded_file ( string filename, string destination)
    This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by destination. If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE. If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file() will return FALSE. Additionally, a warning will be issued. This sort of check is especially important if there is any chance that anything done with uploaded files could reveal their contents to the user, or even to other users on the same system. Note: When safe mode is enabled, PHP checks whether the file(s)/directories you are about to operate on have the same UID as the script that is being executed.Note: move_uploaded_file() is not affected by the normal safe-mode UID-restrictions. This is not unsafe because move_uploaded_file() only operates on files uploaded via PHP. 
    Warning 
    If the destination file already exists, it will be overwritten. 
     See also is_uploaded_file(), and the section Handling file uploads for a simple usage example. 如果出现
    Fatal error: Maximum execution time of 30 seconds exceeded in e:\server\program\apache\htdocs\update\index.php on line 2修改php.ini中的max_execution_time integer
    This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30. The maximum execution time is not affected by system calls, the sleep() function, etc. Please see the set_time_limit() function for more details. 
      

  27.   

    PHP程序中copy()之前加
    set_time_limit(180);
    甚至
    set_time_limit(0);