zend

Zend_Application

坚强是说给别人听的谎言 提交于 2019-12-03 06:48:15
Zend_Application可谓是Zend MVC框架中几大重要模块之一,入口文件index.php一开始读取的时候就需要加载Zend_Application。 让我们从一个Zend框架项目开始会做些什么操作来分析, 首先 就是会读取index.php文件里面的内容这个毫无疑问,在index.php文件里面有 require_once 'Zend/Application.php'; $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/config/application.ini' ); $application->bootstrap() ->run(); 这里就是开始加载一些application的配置参数,让我们都看看其做了些什么 $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/config/application.ini' ); 查看Zend/Application.php 可知道这是开始构造一个类,这个构造函数有两个参数, && APPLICATION_ENV : 一个Application的环境,这个就是读取.ini文件下[production],[development

Zend Framework的配置

梦想与她 提交于 2019-12-03 04:16:51
今天想学一下php框架,就从网上搜索了php的一些比较著名的框架!本想好好地学一下,但是配置却花了大半天。作为初学者,我想很多人都会犯我今天所犯过的错误,所以就根据自己今天配置的时候,所遇到的问题,总结一下,希望对其他初学者有一些帮助! 首先,先从网上下载zendframework,建议从官方网站下载,至于原因,这里就不多说了! 好,下载之后,把它解压到想要的目录之中,我是放在我的php开发目录下面的,如下图所示 接下来,就是先配置php(php版本貌似需要在5.2.0以上,否则,zendframework不能用)和apache。打开你的php.ini文件,添加支持zendframework library工作pdo引擎,如下图 再找到extension=php_pdo.dll和extension=php_pdo_mysql.dll,把它们前面的分号去掉,这样就可以加载这些dll了 然后打开apache的rewrite功能,打开apache的httpd.conf文件,找到LoadModule rewrite_module modules/mod_rewrite.so,将它前面的#去掉。接着,找到AllowOverride,将它后面的None改成All,好像一共改三个 接下来,是我今天犯错误的一步,就是设置环境变量!把路径引入E:\server\ZendFramework\bin

Change Zend Framework Default Module

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm working on a project and have the following project layout: | Project |- Application |- api |- configs |- controllers |- models |- modules |- core |- controllers |- models |- views |- Bootstrap . php |- site1 |- site2 |- site3 |- views |- Bootstrap . php |- Docs |- Library |- Public |-. zfproject . xml I've used this in my application.ini to try and set the default module to be the core module: resources . frontController . controllerDirectory = APPLICATION_PATH "/controllers" resources . frontController . moduleDirectory =

How to install zend framework 2.4.11 skeleton application

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to install ZF 2.4.11 using https://framework.zend.com/manual/2.4/en/ref/installation.html , but after completing the installation, the home page displays ZF version 3.0.2 DEV . How can I correctly install Zend Skeleton Application of desired version (2.4.11) . I am using php 5.6 . 回答1: Execute following: $ git clone https : //github.com/zendframework/ZendSkeletonApplication.git zf2 $ cd zf2 $ git checkout origin / release - 2.4 You will get a message: HEAD is now at ff7b0e4... Pin to 2.4.11 series After that just run: $

PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When i am trying to start Apache, the following error appears in the Apache error log: PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0 回答1: From the error message itself its clear what is the error. Please do some research before posting on stackoverflow. Zend extensions can be loaded directly from /etc/php.ini file or included from /etc/php.d/ directory. In the following example, this ioncube line must appear before any Zend configuration sections. These sections usually

Search multiple indices at once using Lucene Search

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using Zend_Search_Lucene to implement site search. I created separate indices for different data types (e.g. one for users, one for posts etc). The results are similarly divided by data type however there is an 'all' option which should show a combination of the different result types. Is it possible to search across the different indices at once? or do i have to index everything in an all index? Update: The readme for ZF 1.8 suggests that it's now possible to do in ZF 1.8 but I've been unable to track down where this is at in

Failing to build xdebug

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to install xdebug with MAMP on my Mac. I downloaded xdebug-2.2.1.tgz and followed the xdebug wizard to run phpize. I ran make then I was told of some missing files in /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/* . So, I googled that and I saw I had to download php5.4.4 and then push some files in a new 'include' directory I created in /Applications/MAMP/bin/php/php5.4.4/include/php . But when I try to build again, I have this message : /Applications/ MAMP / bin / php / php5 . 4.4 / include / php / Zend / zend

Zend Framework 2 Db\\Adapter\\Adapter query resultset like ZF1

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Just need a hand understanding some simple database queries in ZF2. In ZF1 I have simple methods like this: public function recordset() { // listing of all records $db = Zend_Registry::get('db'); $sql = "SELECT " . $this->_selectlist() . " from customer c"; $r = $db->fetchAll($sql); return $r; } In ZF2, how would I do the same? I have tried the following, but this just returns what looks like a "Result" object, but all I want is an array like ZF1 did with fetchAll. If I have to iterate the result object only to provide the array later, which

What does “XDEBUG NOT LOADED AS ZEND EXTENSION” warning means?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Xdebug is loaded, but not loaded as a zend extension. What does it mean? How to resolve this problem? 回答1: This error means that you used "extension=" to load Xdebug. That could be in your normal php.ini, or in a file called xdebug.ini that some distributions like to add. In any case, Xdebug needs to be loaded as a Zend extension for certain features such as single step debugging. As Xdebug is not meant to work as a normal extension, it might crash and burn too. The syntax for loading Xdebug as Zend extension depends on PHP version and build

How to Ignore Line Length PHP_CodeSniffer

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been using PHP_CodeSniffer with jenkins, my build.xml was configured for phpcs as below <target name="phpcs"> <exec executable="phpcs"> <arg line="--report=checkstyle --report-file=${basedir}/build/logs/checkstyle.xml --standard=Zend ${source}"/> </exec> </target> And I would like to ignore the following warning FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 117 | WARNING | Line exceeds 80 characters; contains 85 characters ------------------------