Pregunta

my file structure for phalcon is something like this

--app
-----controllers
-----models
-----views
-----functions
-----libraries

where functions and libraries folder contains some third party scripts like facebook log in etc, when I include the script in my controller classes, I did

include "../functions/facebook.php"

but it gives a file not found error.

How should I include files in the controller classes?

¿Fue útil?

Solución

Ideally you should be using an autoloader Phalcon provides for automatically loading classes.

For non-classes, did you try using full path?

include __DIR__ . "/../functions/facebook.php";
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top