문제

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: Include 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');.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top