在 Eclipse PDT 中,“PHP include path”的目的是什么?在项目属性中?
想知道当我们右键单击 php 资源管理器中的项目文件夹时,会有一个选项“Php include path”,它不会编辑 php.ini 的 include_path 属性。因此,即使使用此选项指定包含路径,它与项目没有什么不同,那么它的目的是什么?
Was wondering when we right click on project folder in php explorer then there is an option "Php include path" it does not edit include_path property of php.ini . Hence even specifying include path using this option it does no different to project then whats its purpose of it??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它用于在 Eclipse 中将两个项目链接在一起。如果一个项目包含来自另一个项目的代码,则 Eclipse 不知道该连接,并且仅评估您所在项目的代码。因此,例如,如果您尝试使用另一个项目中的函数,则不会有自动完成等那个功能。
通过将第二个项目添加到您的 include_path 中,您将告诉 Eclipse 您正在使用该项目,并且所有项目类、函数等都将添加到自动完成和文档提示中。
您仍然需要通过代码连接两者。
Its is used to link two projects together within eclipse. If one project includes code from another project, eclipse is not aware of the connection and only evaluates the code with the project you are in. So if you try and use a function from another project for example, there would be no auto complete etc for that function.
By adding the second project to your include_path you are telling eclipse that you are using that project and all that projects classes, functions etc will be added to the auto complete and documentation prompt.
You are still required to connect the two by code.
Web服务器(更准确地说:由Web服务器创建的解释器进程)无法知道您甚至使用IDE来编写脚本,因此它也不可能知道项目设置。如果您从 eclipse 中执行它,它会提供一个自定义
php.ini
,其中包含给定的包含路径。The webserver (more accurate: The interpreter process created by the webserver) cannot know, that you even use an IDE to write your scripts, so its also impossible for it to know the project settings. If you execute it from within eclipse, it provides a custom
php.ini
, that contains the given include-path.