i want to add Uploader class into my zend application
in library folder i add uploder.php and inside the Uploder.php i start class with class Amjad_Uploder {...}
in application.ini i add the following lines
includePaths.library = APPLICATION_PATH "/../library"
appnamespace= "Application"
autoloaderNamespaces[] ="Amjad_"
in controller i call the class by writing
$uploder=new Amjad_Uploder();
i still have these errors
Warning: include_once(Amjad\Uploader.php): failed to open stream: No such file or directory in C:\wamp\www\amjad\library\Zend\Loader.php on line 134
Warning: include_once(): Failed opening 'Amjad\Uploader.php' for inclusion (include_path='C:\wamp\www\amjad\application/../library;C:\wamp\www\amjad/library;.;c:\php\includes;D:\Zend Library\') in C:\wamp\www\amjad\library\Zend\Loader.php on line 134
Fatal error: Class 'Amjad_Uploader' not found in C:\wamp\www\amjad\application\modules\admin\controllers\scincetificController.php on line 34
The mistake is that in the
library
folder, you need to create a folder calledAmjad
and placeUploder.php
in there. It sounds like you putUploder.php
directly inlibrary
.