Fatal error while including my php file using require_once()
I am trying to include the files in the php files to my ajax called function.
the way I have written the code is
define('ROOT_PATH', dirname(__FILE__));
require_once ROOT_PATH. '/lib/dao/SqlFun.开发者_运维知识库php';
require_once ROOT_PATH. '/lib/Templates/apply.php';
But its generating the error saying
Warning: require_once(C:\Program Files...
Fatal error: require_once() [function.require]: Failed opening required "filepath.php".
But all those files are there in my project folder itself.
What might be the problem here. If its wrong way then which is the right way to do this.
Thanks in advance.
Having your php and other web related files in a sub-folder of C:\Program Files\...
is a bad idea I guess. There will be permission problems in Visa and Seven because these folders require Administrator privileges which Apache lacks (As far as I know). So what you can try is, try to run Apache as admin. If that works then you might like to put your web related files in some other folder.
精彩评论