From within a controller: $controller = $this->getRequest()->getControllerName(); $action = $this->getRequest()->getActionName(); From within a view: Zend_Controller_Front::getInstance()->getRequest()->getControllerName(); Zend_Controller_Front::getInstance()->getRequest()->getActionName();
Apache Enabling mod Rewrite Debian Wheezy
Apache Enabling ModReWrite In order to use mod_rewrite you can type the following command in the terminal: a2enmod rewrite service apache2 restart Then, if you’d like, you can use the following .htaccess file. setEnv APPLICATION_ENV development RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] The above .htaccess file (if […]
Using Telnet on Windows
1. Control Panel 2. programs and Features 3. Turn Windows Features on and off 4. Tick next to telnet client telnet 38.187.76.209 9091
Recently had a Coding Nightmare, Linebreaks make a difference… Windows uses the CRLF (Carriage Return line Feed) represented as /r/n While linux uses LF (Line Feed) represented as /n Why the hell has no one mentioned this to me before…. Check the following Coding Horror to prevent these incidents from happening again… You can […]
PHP dump a variable to a file
$var_str = var_export($data, true); $var = “$var_str”; file_put_contents(‘/var/some/location/on/server/value.txt’, $var);