天天看点

undefined function: file_put_contents()的问题

系统:CentOS release 4.7 (Final)    yum安装自带的RPM包

undefined function:  file_put_contents() ,PHP调用不了这个函数,

发现是版本问题。同一个脚本中的file_get_contents()是PHP 4&5都有的,而这个file_put_contents()函数却是PHP5新增的函数。不过调用函数出错,在页面上却没有任何提示,要查看apache的日志文件才能发现。

本文转自 holy2009 51CTO博客,原文链接:http://blog.51cto.com/holy2010/411444