简体   繁体   中英

Zend Framework: Model class not found

The following exception is thrown on my server:
Fatal error: Class 'My_Model_Bo_User_Agenda_Doctors' not found in...
Though in localhost everything is working fine.

I checked that everything was correctly uploaded; all the files are present and not corrupted. I also tried to upload several times. So this doesn't seem to be the problem.

Any idea why a class couldn't be found on the server ?

You don't say so in your question, but I suspect that you are developing on windows and hosting on Linux.

Windows is not case sensitive to path names, but Linux is! Check that:-

  1. Doctors.php is not doctors.php
  2. Agenda/ is not agenda/ .etc
  3. Lastly check the class name in the class declaration is correct and correctly cased.

Do not just think to yourself, yes I've done that, go and check them carefully. Believe me, bitter experience has taught me this problem is always due to a trivial oversight like this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM