質問

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?

役に立ちましたか?

解決

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";
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top