klyz 发表于 2010-11-3 07:21:28

关于文件上传大小的设置!

一般来说,如果您是国内的虚拟主机,是无法设置php.ini的,你只能咨询空间提供商,叫他们帮你设置大一点(一般他们不会帮忙设置);如果是国外的虚拟主机,可以将 php.ini 在 cgi-bin/ 目录下设置,调整即可。


我是国外主机,我也问过,我可以自行创建 php.ini, 请问要怎么做?帮助里的这段没看懂...

PS:我的主机是无限空间的....不利用起来太可惜了....

along 发表于 2010-11-3 10:58:16

国外的主机,每一个主机商有不同的设置。你只能咨询你的主机商,要怎么配置

klyz 发表于 2010-11-3 14:18:42

我问了主机商,回了一个这样的:

You can also change the settings in php.ini file. Please login to cPanel >> File Manager >> Under /public_html folder, create a new file with the name php.ini .In the php.ini file, locate the line which you would like to implement and click save. You can also locate the php.ini file in any of the the folder under public_html which you would to have.

我在根目录下创建php.ini,可是打开是空白文件咯,我要如何找到post_max_size)(upload_max_filesize) 所在位置咯?

楼主能不能给我个php.ini范例看看?

along 发表于 2010-11-3 16:10:24

看附件,

klyz 发表于 2010-11-4 13:02:08

主机商给了我一个新的回复:

You can apply custom PHP settings on a per-folder basis using a local php.ini file.

For example, you need post_max_size and upload_max_filesize set to 200M in a directory. For this purpose you should log in your cPanel and go to the File Manager. There navigate to the directory where you'd like this setting applied. In this directory create a file php.ini containing:

post_max_size = 200M
upload_max_filesize = 200M

意思是我可以对各个文件夹进行设置,那PHPDISK中,用户上传的文件在哪个文件夹?

along 发表于 2010-11-4 13:29:16

国外的主机,一般有一个cgi-bin/ 目录,你直接在这个目录创建php.ini 就可以了。
页: [1]
查看完整版本: 关于文件上传大小的设置!