回答列表
其实这个问题很简单,就是fopen的线程,可能已经被fclose关闭了,或者fopen打开线程失败,这可能是文件操作权限不够。
php请放弃fopen,用file_put_contents
if(!is_file(tmp_path.'jusitemap.xml'))。
file_put_contents(tmp_path.'jusitemap.xml',$str)。
else
file_put_contents(tmp_path.'jusitemap.xml',$str,file_append)。
if(!is_file(tmp_path.'jusitemap.xml'))。
file_put_contents(tmp_path.'jusitemap.xml',$str)。
else
file_put_contents(tmp_path.'jusitemap.xml',$str,file_append)。