Frustrating Smarty Error : call to undefined function phperror_reporting

瘦欲@ 提交于 2019-12-13 07:14:59

问题


I am trying to upload my site onto the server but I keep getting the following error:

Fatal error: Call to undefined function phperror_reporting() in /home/jagani/public_html/theforum/forumfiles.php on line 1

First few lines of the file are:

<?php

error_reporting(E_ALL^E_NOTICE);

session_start();

Seems that the space between the php and error_reporting isn't being registered. I'd appreciate any insight on this problem.


回答1:


As you said, it sounds like a problem with the whitespace. If you've got ssh access, I'd try creating a test php file by typing vi test.php and then putting the following code:

<?php

print("test");

?>

Try viewing that file and see if it works; if so, then your problem is an encoding issue, which you might be able to fix by running dos2unix on the affected file. Does it only affect that one file (and/or others) or is it any php file on the system?



来源:https://stackoverflow.com/questions/8691837/frustrating-smarty-error-call-to-undefined-function-phperror-reporting

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!