开发者

require_once file not found in php eclipse project

开发者 https://www.devze.com 2022-12-31 11:25 出处:网络
I have a php script that has the following requirement command: require_once \'HTTP/OAuth.php\'; the file HTTP/OAuth.php is in php\'s include_path that is .:/usr/lib/php.

I have a php script that has the following requirement command: require_once 'HTTP/OAuth.php'; the file HTTP/OAuth.php is in php's include_path that is .:/usr/lib/php.

Nevertheless in Eclipse the require_once line is marked with the following warning: In开发者_JAVA技巧clude filename: 'HTTP/OAuth.php' doesn't exist in project:

How can I make my project see the include_path so it can find the require_once file?


I honestly think you can't access any folder outside the root of your web application, basically you can't go any further than /. Imagine you use a shared web hosting service and someone access your files at will, it's just not safe at all.

You can, however, copy the file and put in inside your application scope. E.g: require('/includes/OAuth.php');.

0

精彩评论

暂无评论...
验证码 换一张
取 消