#warning#当我将php文件从一个站点复制到同一个Zend中的另一个站点时,调用未定义的函数'print_r'

问题描述:

enter image description here

  • I can't really understand what happened here. What I've done was to copy a php file to another project in the same Zend. It's a warning, not an error.

  • My computer is supposed to have only one php version, so it seems nothing to do with the php version.

  • the function is standard "print_r", so it seems nothing to do with the undefined function.

the code is very normal, like : print_r ( "image:" );

p>

  • 我真的不明白这里发生了什么。 我做的是将php文件复制到另一个项目 在同一个Zend。 这是一个警告,而不是错误。 p> li>

  • 我的电脑应该只有一个php版本,所以它似乎与php版本无关。 p> li>

  • 该函数是标准的“print_r”,所以它似乎与未定义的函数无关。 li> ul>

    代码非常正常,例如:print_r(“image:”); p> div>

try this kb.zend.com/index.php?View=entry&EntryID=415 – @Rakesh Sharma

To workaround this problem the user needs to manually add relevant content into the '.buildpath' file.

  • Close the project (Project | Close Project).
  • Open the '.buildpath' file that resides in the project's root directory with a text editor. If the file does not exist, create it. Paste the correct contents into the '.buildpath' file:

.buildpath contents for a PHP Project

<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
    <buildpathentry kind="src" path=""/>
    <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>

.buildpath contents for a Zend Framework Project

<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
    <buildpathentry kind="src" path=""/>
    <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
    <buildpathentry kind="con" path="org.zend.php.framework.CONTAINER"/>
</buildpath>
  • Save the file.
  • Open your project (Project | Open Project).
  • Rebuild the project (Project | Clean).

After the build process finishes, you should see no warnings for standard PHP functions.