SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict MikesBarto2002's Avatar
    Join Date
    May 2006
    Location
    New York City
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question PHP Autoload not working

    Can anyone help me with this autoload? The errors I am receiving are:

    Fatal error: Class 'Genesis\Controller\Login' not found in /genesis/genesis/index.php on line 30

    I created a Pastebin so as to not have to copy/paste all of the code here. http://pastebin.com/Zj1B7WsB In the pastebin is all of the files needed as well as my file structure.

    Any help would be much appreciated. I'm really at a loss.

    Thanks!
    James Web Development | New York, NY
    Design, Develop, Deliver

  2. #2
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,312
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)
    http://php.net/manual/en/language.oop5.autoload.php

    Your function needs to be named __autoload, not autoload. And it needs to actually include something, not just return a file name.
    "First make it work. Then make it better."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •