This question already has an answer here:
Reference - What does this error mean in PHP? 30 answers
The answer was due to hidden characters located in the lessons.db file.
The error shown had nothing to do with this and I would like to thank everyone who took the time to give their two pence.
I have two things for you:
When you say: "I know it's a lot of code but I can't work out why this is happening all of a sudden, literally in one refresh without any change to code. Even if I backtrace to earlier versions that also worked this is happening." I would like to ask if you are programming on you PHP code through a browser? If so, sometimes the cache will mess with you, and I find it much easier to develop my PHP models through the PHP command-line interface. If this is not for you, maybe consider turning your browsers cache completely off when developing. I think the problem you are experiencing comes from syntax errors in the public function columns of your Config class. I think you have to read up on the syntax of switch-cases http://php.net/manual/en/control-structures.switch.php here you will notice that you have used semicolons after case guards, where you should have used simply colons. Also there is no need to break; after you return, as your code will never reach this point anyway ... I hope this helps - good luck ...
链接地址:
http://www.djcxy.com/p/69398.html
上一篇:
致命错误:调用成员函数...在字符串上
下一篇:
PHP:致命错误:调用非成员函数