【发布时间】:2009-09-23 08:34:26
【问题描述】:
在 php.ini 中包含该库后,我尝试在 DOS 窗口中通过键入 C:\wamp\www\Zend\bin>zf.bat create project quick start 我得到一个错误消息:
'"php.exe"' 不是内部或外部命令、可运行程序或批处理文件。"
出现此错误消息的原因是什么,解决方法是什么?
【问题讨论】:
标签: zend-framework
在 php.ini 中包含该库后,我尝试在 DOS 窗口中通过键入 C:\wamp\www\Zend\bin>zf.bat create project quick start 我得到一个错误消息:
'"php.exe"' 不是内部或外部命令、可运行程序或批处理文件。"
出现此错误消息的原因是什么,解决方法是什么?
【问题讨论】:
标签: zend-framework
• Go to ‘My Computer’ > Properties > Advanced Tab >EnvironmentVariables.
Environment Variables box will open, View SYSTEM VARIABLES, scroll the list to ’ PATH ‘ >
double click ’ PATH ‘ . Add the following line to the end of the PATH C:\xampp\php
Zend Framework
• Extract the Zend Framework files to C:\wamp\php\zf.
• Edit the php.ini file. You will find it at C:\wamp\php\php.ini.
Find the line that says ’ include_path ’ and edit the line:
Windows: “\path1;\path2″
include_path = “C:\wamp\php\zf\library”
• Open a shell and cd to C:\wamp\www folder and type this:
C:\wamp\www>C:\xampp\php\ZendFramework\bin\zf.bat create project
testproject(project name)
• Now Copy the Zend Folder from your ZendFramework folder ( C:\xampp\php\zf/library /Zend) into the library folder of your new test project ( C:\xampp\htdocs\testproject\library\Zend
【讨论】:
确保您的 php.exe 在您的路径变量中。
【讨论】:
如前所述:
确保您的 php.exe 在您的 路径变量。
或编辑该 bat 文件以使用系统上 php.exe 的绝对路径, 并确保您的系统中有 php.exe。
此外,在大型项目的情况下,PHP 应该作为 LAMP 堆栈的一部分而不是 Wamp 来开发(否则,为什么要使用 ZF?)
【讨论】: