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

博主发现Godaddy服务器支持自定义php.ini文件,这解决了其PHP程序因抓取大量网页导致的超时问题。通过将自定义的php.ini文件上传到FTP根目录,并设置如"memory_limit=100M"的参数,可以立即生效。Godaddy服务器被称赞性价比高,支持支付宝支付,且访问速度快。
摘要由CSDN通过智能技术生成

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" 等的一些文件。

然后再刷新一下你的phpinfo文件,你看看刚才设置的值有没有变化,如果忘记之前的是多少了,那就再改个数字“memory_limit=120M”,再看看。

其实就这样简单。

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

4659e75b25c90501f8cd923490159e2f.gif)

最后我想说的是godaddy上的服务器真的很好,比国内的好很多很多,价格便宜,不用备案,国内访问速度也不差,人家那才真的是往云计算发展的,新域名第一年还免费。搞起来吧!支持支付宝付款哦,嘻嘻。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值