修改PHP.ini以下设置:
upload_max_filesize = 2M
改为你希望的最大上载文件的大小.
upload_max_filesize = 2M
改为你希望的最大上载文件的大小.
解决方案 »
- mysql连接符问题?
- 怎样用代码保存flash里播放 的视频?
- include_path的问题,多日无解,请求帮助
- 两年来开发了几套php产品 开始散分
- 关于ImageMagick库转换图像格式的参数问题?
- 想做PHP方面的兼职工作...100分,帮忙顶一下哦
- 如何保存正则表达式匹配出来的结果?
- 上传文件路径问题
- 大散分了!!!请问有主页的朋友!!
- 快来看看,这个主页空间不支持文件读写,怎么办? Warning: fopen("./data/user.dat", "w") - Permission denied in /usr/vhome/e/k/i/XX
- 文件读写问题
- 菜鸟问题,页面刷新..
upload_max_filesize = 2M
改为你希望的最大上载文件的大小.
在apache中,http.conf中有一个文件最大字节的限制
你在找一下,应该有的
你不如自己把程序文件传到一个类UNIX服务器上试好些.
upload_max_filesize = 2M
post_max_size = 8M改为你希望的最大上载文件的大小.
如果還不行,試試看修改這個 .
memory_limit = 8M
我现在也面对这个问题,相关设置有四项,都改了,还是不行,
现在想用ftp解决了。
该页无法显示
您要查看的页当前不可用。网站可能遇到技术问题,或者您需要调整浏览器设置。 --------------------------------------------------------------------------------请尝试以下操作:单击刷新按钮,或以后再试。如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。要查看连接设置,请单击工具菜单,然后单击 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
大于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看见了吧?最后是被时间限制住了.我是在本机上测试的.
如果不行的话,建议用ftp吧...
传小的文件有没有事?实在不行,只好FTP了..呵呵.
怎么可能不行呢???????????
我刚刚传了一个2m的东东,但是,过一会儿就传不来了...停止响应一样..
唉...
用ftp吧..
1.upload_max_filesize=10M
2.max_execution_time=700
3.memory_limit=15M我用copy和move_uploaded_file上傳一個8M的文件,試了三次,都成功了
上传的方法有两种:
1.copy
2.ftp
用copy传送小文件还可以,但是传送大文件,如100M的就不行了。
具体做法,参考php的帮助文件。
首先连接ftp地址。
然后将文件及路径输入就可以传送了。
不同的是前者祇能上傳用post方法上傳的文件
用is_uploaded_file可以判斷上傳文件是否通過post方法
(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.
set_time_limit(180);
甚至
set_time_limit(0);