简体   繁体   English

在Eclipse PDT中,项目属性中“ PHP包含路径”的目的是什么?

[英]Inside Eclipse PDT whats the purpose of “PHP include path” in project properties?

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 . 想知道何时我们右键单击php Explorer中的项目文件夹,然后有一个选项“ Php include path”,它不编辑php.ini的include_path属性。 Hence even specifying include path using this option it does no different to project then whats its purpose of it?? 因此,即使使用此选项指定包含路径,对项目进行投影也没有什么不同,那么它的目的是什么?

Its is used to link two projects together within eclipse. 它用于在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. 如果一个项目包含来自另一个项目的代码,则eclipse不会知道连接,而只会评估您所在项目的代码。因此,例如,如果尝试使用另一个项目中的函数,则不会自动完成该功能。

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. 通过将第二个项目添加到include_path中,您将告诉eclipse您正在使用该项目,并且所有这些项目的类,函数等都将添加到自动完成和文档提示中。

You are still required to connect the two by code. 您仍然需要通过代码连接两者。

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. 网络服务器(更准确的说:由网络服务器创建的解释器进程)无法知道,甚至使用IDE来编写脚本,因此它也不可能知道项目设置。 If you execute it from within eclipse, it provides a custom php.ini , that contains the given include-path. 如果从eclipse中执行它,它将提供一个自定义php.ini ,其中包含给定的include-path。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM