Monday, March 19, 2012

Re: AppImport from Lib folder in 2.1

If you are including a file that doesn't take the place of a core file then you do not put it in your apps Lib directory, or in the core lib directory at all.
If it is not a component or plugin which go in their respected locations then you place external php files in your apps vendor folder.
This keeps the environment clean, so all CakePHP code is in the correct place, and any external php code is in it's rightful place.

On Monday, March 19, 2012 6:26:58 PM UTC-7, Sergei wrote:
Hello,

So I've put my func.php to Lib dir and loaded it with App::import('Lib','func').

Everything worked on local Windows server, until I uploaded it to Linux production server. Then it said: requested file couldnt be found or something.

I had to move these files to Vendor and load them using App::import('Vendor','func') on the server. This way it worked.

Anyone knows why?


Thanks,
Sergei.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: