how to use godaddy custom php.ini(如何在godaddy上修改php.ini文件)

Today I was find godaddy can change php.ini for self website, that's a suprise for me. I was write a php soft to crawl a mother website , and used multithreading, but the problem is time out.

I find more website and they write more , but the same question , how to us custom php.ini, have not a answer.

In fact, that is so easy.

Just upload your php.ini file to your root ftp. Yes, that's root on your ftp, not in the public_html floder,and not in the other floder. just in the root!

and write your new Parameters in your php.ini .like "memory_limit=100M", that's will be used Immediately, and you can see it was been changed in "echo phpinfo();".

that's all ! go on to do your job !

And last, I need tell you all the hosting in godaddy all support use custom php.ini now.


最近我写了一个php程序用来抓取网站用的,但是网站页面太多,php程序总是超时,后来我看了一下godaddy的服务器,上面有个custom php.ini。也就是说goodaddy的服务器是支持自定义php.ini文件的。当然说了是自定义,不是说的是全部。比较这个东西和安全相关系。后来我在网上找了很多关于如何设置php.ini的,结果还是一样,都没有写到位。这里我再简单写一下,不过我想应该是够了。

其实很简单。你先写个程序输出一下phpinfo。然后写一个php.ini文件,文件里只写入一行“memory_limit=100M”,上传到你的ftp根目录下,注意是根目录,不是在public_html或者puplic_ftp或者是其他文件,根目录中你会发现有一些,什么".md5sum", ".contactemail" 等的一些文件。



如果有多个需要设置 , 那跟正常的php.ini文件中的写法是一样的。就是换行咯。。。(ps:废话真多 smiley