zendframework 用命令行搭建项目需注意的问题

zf 通过命令行来生成项目环境:(前提是已经有php运行的环境了)
1.下载zf的库文件。

2.D:\ZendFramework-1.11.10\bin 加入系统环境变量

3.修改php.ini下面的include_path,如下:

include_path = ".;D:\xampp\php\pear\;D:\ZendFramework-1.11.10\library\"

4.打开cmd.exe,cd 到你需要建项目的目录执行以下命令:
    zf create project quickstart(项目名)

    zf create controller News(控制器名字)

如果顺利则项目环境搭建成功。我这里主要记录一下我在实验的时候出了一系列错误。
错代码:

Warning: domdocument::domdocument(): Entity: line 1: parser error : Start tag ex
pected, ‘<’ not found in C:\xampp\htdocs\ZendFramework\library\Zend\Tool\Project
\Profile\FileParser\Xml.php on line 74

Warning: domdocument::domdocument(): 1.0 in C:\xampp\htdocs\ZendFramework\librar
y\Zend\Tool\Project\Profile\FileParser\Xml.php on line 74

Warning: domdocument::domdocument(): ^ in C:\xampp\htdocs\ZendFramework\library\
Zend\Tool\Project\Profile\FileParser\Xml.php on line 74

Fatal error: Call to undefined method domdocument::importNode() in C:\xampp\htdo
cs\ZendFramework\library\Zend\Tool\Project\Profile\FileParser\Xml.php on line 77

解决方法:网上说是加载 php_domxml.dll引起的,只需要disable掉这个就可以了,我按照这个方法成功解决。

原文:

I suspect that loading php_domxml.dll in your php.ini is the cause of this problem. Try to disable it and see if that helps.

There are two very similarly named extensions, dom and dom_xml – the dom extension is built into php5 and loading the dom_xml extension (designed for php4) will override the default extension.

http://normankosmal.com/wordpress/index.php?p=47&cpage=3

 

你可能感兴趣的:(职场,framework,出错,Zend,环境搭建,休闲,zf命令行)