This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In Controller : $this->getServiceLocator() | |
| In Controller Plugin : $this->getController()->getServiceLocator() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace SampleModule\Form; | |
| use Zend\Form\Form; | |
| class SampleForm extends Form | |
| { | |
| public function __construct($name = null) | |
| { | |
| parent::__construct('Sample Form'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CFLAGS="-arch i386" ./pecl install uploadprogress (this 'forces' a 32 bit install of the extension) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Zend\Mail\Message; | |
| use Zend\Mail\Transport\Smtp as SmtpTransport; | |
| use Zend\Mime\Message as MimeMessage; | |
| use Zend\Mime\Part as MimePart; | |
| use Zend\Mail\Transport\SmtpOptions; | |
| ////////// | |
| $message = new Message(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Directory my mac : | |
| /usr/local/mysql-5.5.21-osx10.5-x86_64/data | |
| grant all on *.* to 'root'@'%' | |
| mysql> set GLOBAL read_only = false; | |
| Query OK, 0 rows affected (0.00 sec) | |
| mysql> FLUSH TABLES WITH READ LOCK; | |
| Query OK, 0 rows affected (0.07 sec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC,OR] | |
| RewriteCond %{REQUEST_URI} !yourapp/public | |
| RewriteRule (.*) /yourapp/public/$1 [L] | |
| place it at your public_html (shared hosting 'root' directory ). | |
| if you call http://yourdomain.com so you will point out to public_html/yourapp/public/index.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Group -> Order -> Limit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sortingAssoc($array, $sortby = "id",$sortir="asc") | |
| { | |
| $temp = array(); | |
| foreach($array as $key=>$row) | |
| { | |
| $temp[$key] = $row[$sortby]; | |
| } | |
| if ($sortir=="asc") sort($temp); else rsort($temp); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| assume, i have a method in AlbumTable class like the following : | |
| <?php | |
| ///////// | |
| public function fetchAll() | |
| { | |
| $sqlSelect = $this->tableGateway->getSql() | |
| ->select()->columns(array('artist', 'title', 'id')) | |
| ->join('track', 'track.album_id = album.id', array(), 'left'); | |
| return $this->tableGateway->select($sqlSelect); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| chdir('/Users/abdulmalikikhsan/www/YOURZF2APP'); | |
| require 'init_autoloader.php'; | |
| Zend\Mvc\Application::init(require 'config/application.config.php'); | |
| chdir(__DIR__); | |
| session_start(); |
OlderNewer