0

Just getting started with Laravel and struggling a bit with the learning curve and lack of detailed documentation. I am trying to use class.upload.php by verot.net and cannot seem to get the class to load.

I uploaded the class directory to application/libraries/class.upload_0.31 and the filename for the actual class is class.upload.php. I then updated the Autoloader::map like so -

Autoloader::map(array(
    'Base_Controller' => path('app').'controllers/base.php',
    'Upload' => path('app').'libraries/class.upload_0.31/class.upload.php',
));

I then attempt to call the class with $handle = new upload(..); as per the documentation for Class Upload.

I believe I followed the documentation correctly to map a class to its location but I keep running into the error Class 'upload' not found. The class name in class.upload.php is upload.

What am I missing?

0

1 Answer 1

4

The class name is upload, with a lowercase u. The array key has to exactly match the class name:

Autoloader::map(array(
    'Base_Controller' => path('app').'controllers/base.php',
    'upload' => path('app').'libraries/class.upload_0.31/class.upload.php'
  // ^ this should be lowercase
));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.