在 php eclipse 项目中找不到 require_once 文件
我有一个 php 脚本,它具有以下要求命令: require_once 'HTTP/OAuth.php';
文件 HTTP/OAuth.php 位于 php 的 include_path 中,即 .:/usr/lib /php
.
尽管如此,在 Eclipse 中,require_once 行标有以下警告: Include filename: 'HTTP/OAuth.php' does not exit in project:
How can I make my project see the include_path so it can find the require_once file?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老实说,我认为您无法访问 Web 应用程序根目录之外的任何文件夹,基本上您不能比
/
更进一步。想象一下,您使用共享网络托管服务,并且有人随意访问您的文件,这根本不安全。但是,您可以复制该文件并将其放入您的应用程序范围内。例如:
require('/includes/OAuth.php');
。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');
.