zend-framework

$this->getRequest()->isPost() return false

折月煮酒 提交于 2021-02-09 01:20:57
问题 I'm working on an existing code who the last developer have created a form but without using a "$form", and the code is: public function indexAction() { ....... $objRequest = $this->getRequest(); var_dump($objRequest->isPost()) ==> all time return false if ($objRequest->isPost()) { $postedData = $objRequest->getPost(); $inputData = new Zend_Filter_Input($this->filters, $this->validators, $objRequest->getPost()); $params = $this->getRequest()->getParams(); if ($inputData->isValid()) { .....

$this->getRequest()->isPost() return false

我怕爱的太早我们不能终老 提交于 2021-02-09 01:14:04
问题 I'm working on an existing code who the last developer have created a form but without using a "$form", and the code is: public function indexAction() { ....... $objRequest = $this->getRequest(); var_dump($objRequest->isPost()) ==> all time return false if ($objRequest->isPost()) { $postedData = $objRequest->getPost(); $inputData = new Zend_Filter_Input($this->filters, $this->validators, $objRequest->getPost()); $params = $this->getRequest()->getParams(); if ($inputData->isValid()) { .....

$this->getRequest()->isPost() return false

孤街醉人 提交于 2021-02-09 01:13:45
问题 I'm working on an existing code who the last developer have created a form but without using a "$form", and the code is: public function indexAction() { ....... $objRequest = $this->getRequest(); var_dump($objRequest->isPost()) ==> all time return false if ($objRequest->isPost()) { $postedData = $objRequest->getPost(); $inputData = new Zend_Filter_Input($this->filters, $this->validators, $objRequest->getPost()); $params = $this->getRequest()->getParams(); if ($inputData->isValid()) { .....

$this->getRequest()->isPost() return false

ⅰ亾dé卋堺 提交于 2021-02-09 01:12:14
问题 I'm working on an existing code who the last developer have created a form but without using a "$form", and the code is: public function indexAction() { ....... $objRequest = $this->getRequest(); var_dump($objRequest->isPost()) ==> all time return false if ($objRequest->isPost()) { $postedData = $objRequest->getPost(); $inputData = new Zend_Filter_Input($this->filters, $this->validators, $objRequest->getPost()); $params = $this->getRequest()->getParams(); if ($inputData->isValid()) { .....

Oracle TNS Permission Denied *

ε祈祈猫儿з 提交于 2021-02-08 14:41:26
问题 I'm using: CentOS 6.7 Zend.1.2.15 using oci8, using instantclient 11.2 x64 PHP 5.4.45 Trying to connect to an Oracle: Oracle Database 10g Release 10.2.0.4.0 Already checked credentials, already tried to connet to other Oracle server but the error still the same: 12546 ORA-12546: TNS:permission denied * Already gave 0777 permission to /usr/local/oracle/11.2/client64/ following some answer around but none of them solved. Server does not have the IP in any sort of blacklist. The same code runs

Oracle TNS Permission Denied *

寵の児 提交于 2021-02-08 14:41:08
问题 I'm using: CentOS 6.7 Zend.1.2.15 using oci8, using instantclient 11.2 x64 PHP 5.4.45 Trying to connect to an Oracle: Oracle Database 10g Release 10.2.0.4.0 Already checked credentials, already tried to connet to other Oracle server but the error still the same: 12546 ORA-12546: TNS:permission denied * Already gave 0777 permission to /usr/local/oracle/11.2/client64/ following some answer around but none of them solved. Server does not have the IP in any sort of blacklist. The same code runs

Add a new column in Doctrine 2 in Zend Framework

拈花ヽ惹草 提交于 2021-02-08 09:28:20
问题 I have Zend framework script with doctrine 2. I need to add a new column, what is the correct chronology to go about doing that i.e create column, update entities, run migration etc. Any help appreciated. 回答1: If you want manually then create a column in database table and specify that column in you entity class as bellow /** * @ORM\Column(type="string") // if column is varchar */ protected $title; if you have already set a CLI for generate entity and database schema file Then use this -- add

PHPStorm / debugger not stopping at certain breakpoints

南笙酒味 提交于 2021-02-07 13:28:58
问题 I've set up XDebug (2.2.1) and PHPStorm-IDE (Mac OS X 10.7.5) with standard LAMP stack for Mac OS (Apache 2.2.22, PHP 5.3.15). /etc/php.ini [xdebug] zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so xdebug.file_link_format="txmt://open?url=file://%f&line=%1" xdebug.remote_enable = On xdebug.remote_autostart = "PHPSTORM" xdebug.var_display_max_data = 1024 xdebug.dump.GET=* xdebug.dump.POST=* xdebug.show_local_vars=On xdebug.dump.SERVER=* xdebug.dump_globals=On xdebug

Zend Framework 1.9.2+ Zend_Rest_Route Examples

我是研究僧i 提交于 2021-02-06 09:19:12
问题 With the introduction of Zend_Rest_Route in Zend Framework 1.9 (and its update in 1.9.2) we now have a standardized RESTful solution for routing requests. As of August 2009 there are no examples of its usage, only the basic documentation found in the reference guide. While it is perhaps far more simple than I assume, I was hoping those more competent than I might provide some examples illustrating the use of the Zend_Rest_Controller in a scenario where: Some controllers (such as

return multiple json results

萝らか妹 提交于 2021-02-05 05:55:13
问题 I have to output $var1 . To do that, I return results by using sendJson($var1); And this is working fine for me. Now I want to pass two variables $var1 and $var2 using sendJson(); . Is it possible? 回答1: Put them all inside an array: sendJson(array($var1, $var2)); Or name them if you don't want to do it index-based: sendJson(array('var1' => $var1, 'var2' => $var2)) 回答2: name your array keys: echo json_encode( array ( 'messages' => array( 'peter' => 'Hello', 'john' => 'Hi to you too' ), 'users'