Home > Backend Development > PHP Tutorial > the resource is not on the build path of a php pro

the resource is not on the build path of a php pro

WBOY
Release: 2016-06-20 12:40:14
Original
1008 people have browsed it

一个工程已经存在了,例如叫myproject然后你将其导入了eclipse中, 无论你是通过import实现的还是通过new了一个相同名字的myproject并且在相同的workspace下,实现项目的导入, 你都可能遇到一个麻烦, 就是当你按住 'Ctrl'键并且点击一个集成的类或方法时 会提示the resource is not on the build path of a php project

那么怎么办呢:找到你的工程文件位置, 例如我的工程myproject下肯定有一个文件“.project” 用记事本打开它你会看到

<projectDescription>	<name>myproject</name>	<comment></comment>	<projects>	</projects>	<buildSpec>	</buildSpec>	<natures>	</natures></projectDescription>
Copy after login


将其全部替换为

<?xml version="1.0" encoding="UTF-8"?><projectDescription>	<name>myproject</name>	<comment></comment>	<projects>	</projects>	<buildSpec>		<buildCommand>			<name>net.sourceforge.phpeclipse.parserbuilder</name>			<arguments>			</arguments>		</buildCommand>		<buildCommand>			<name>org.eclipse.wst.validation.validationbuilder</name>			<arguments>			</arguments>		</buildCommand>		<buildCommand>			<name>org.eclipse.dltk.core.scriptbuilder</name>			<arguments>			</arguments>		</buildCommand>		<buildCommand>			<name>org.zend.php.zendserver.deployment.core.DeploymentBuilder</name>			<arguments>			</arguments>		</buildCommand>	</buildSpec>	<natures>		<nature>org.eclipse.php.core.PHPNature</nature>		<nature>org.zend.php.zendserver.deployment.core.DeploymentNature</nature>		<nature>net.sourceforge.phpeclipse.phpnature</nature>	</natures></projectDescription>
Copy after login


注意eclipse的本班不同这个xml文件可能会有差异,那么怎么办呢, 你只需要创建一个新的工程, 然后将其生成的“.project”文件 里的内容复制下, 然后替换你的目的工程的“.project”文件 并作小小的改动将your project name就可以了

文章出处: 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template