简体   繁体   English

更改 php.ini 包含路径,Zend Framework

[英]Alter php.ini include path, Zend Framework

I've looked at every question that has been asked on this so far, and none have helped.到目前为止,我已经查看了有关此问题的每个问题,但没有一个有帮助。 Partially, this is because in all these years, I've avoided learning the in depth how-to's of php.ini manipulation.部分原因是这些年来,我一直避免深入学习 php.ini 操作方法。 (other than errors and other basic changes). (错误和其他基本更改除外)。

I'm running Windows 7, and I installed Zend Framework to c:\wamp.我正在运行 Windows 7,我将 Zend Framework 安装到 c:\wamp。 thus far, I've opened my php.ini file, and changed it to the following:到目前为止,我已经打开了我的 php.ini 文件,并将其更改为以下内容:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes;C:\wamp\ZendFramework-1.11.11\library"

When I try to run zf in the command line, I get an error, "In order to run the zf command, you need to ensure that Zend Framework is inside your include path".当我尝试在命令行中运行 zf 时,出现错误“为了运行 zf 命令,您需要确保 Zend Framework 在您的包含路径中”。

I have also added a user variable to my environment variables我还在我的环境变量中添加了一个用户变量

ZEND_TOOL_INCLUDE_PATH  set to C:\wamp\ZendFramework-1.11.11\library

At this point, I'm basically stuck.在这一点上,我基本上被卡住了。 Any help would be greatly appreciated.任何帮助将不胜感激。 Am I including the path wrong in the php.ini file?我是否在 php.ini 文件中包含了错误的路径?

You need to uncomment the include line.您需要取消注释 include 行。 (Remove semi-colon at the start of the line) (去掉行首的分号)

include_path = ".;c:\php\includes;C:\wamp\ZendFramework-1.11.11\library"

instead of代替

;include_path = ".;c:\php\includes;C:\wamp\ZendFramework-1.11.11\library"

When a line in an INI file begins with ";", it denotes a comment and is not parsed.当 INI 文件中的一行以“;”开头时,它表示注释并且不被解析。 Simply remove that, and you should be good to go!只需删除它,你就可以开始了!

Also you can add zend path and php path in environment variable您也可以在环境变量中添加 zend 路径和 php 路径

Stpes: Go to My computer -> right click ->select properties -> Click on change settings->click on advance ->click on environment variales-> go to system vaiable -.步骤:Go到我的电脑->右键单击->选择属性->单击更改设置->单击高级->单击环境变量->go到系统变量-。 edit path -> add your php and zend path here编辑路径 -> 在此处添加您的 php 和 zend 路径

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

相关问题 Zend Framework php.ini包含路径 - Zend Framework php.ini include path 将Zend Framework添加到php.ini include_path导致Drupal网站空白 - Adding Zend Framework to php.ini include_path causes Drupal site to go blank 尝试在CLI中运行zend框架phpunit测试,但无法更改php.ini文件中的include_path - Trying to run a zend framework phpunit test in CLI, but can't change the include_path in php.ini file 在zend设置下,php.ini中的包含路径未更新 - include paths in php.ini not updating - under a zend setup 在bluehost服务器上的php.ini中包括Zend Framework库 - Including Zend Framework library in php.ini on bluehost server 为什么Zend Framework模块在APPLICATION_PATH“ /../data/session”中而不是在php.ini的“ session.save_path”中创建会话? - Why a Zend Framework module create a session in APPLICATION_PATH “/../data/session” and not in the “session.save_path” of php.ini? 为什么php.ini中的include_path被忽略? - why is include_path in php.ini being ignored? Zend Framework在Application.ini中包含princexml路径 - Zend Framework include princexml path in Application.ini 配置php.ini以使用Zend AutoDiscovery - config php.ini for using Zend AutoDiscovery Windows上的PHP包含Zend Framework的路径不起作用 - PHP on Windows Include path for Zend Framework not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM