How to Implement Testing on Yii Framework 1 So you’ve finally realised to verify the quality of the code in releases and make sure everything is working before you deploy to production you need to test. First we’ll use phpunit for unit testing. Installing PHPUnit with Composer We will only handle installing the required packages […]
Category: PHP 5
Initial Preparation First of all do a project in PHP that utilises the database. I am talking about pure PHP and not a framework. Remember to turn make sure you set the following configuration settings. display_errors = 1; error_reporting(E_ALL); You can always view the php documentation which is always of great help. Get ready for […]
PHP echo does not work on Server to Test
So you are trying to test a solo PHP script on a webserver and it is not working? It is not printing anything at all. Here is a checklist to help you sort it out: 1. Make sure your server supports PHP 2. Make sure the PHP module is enabled 3. Make sure the script […]
It’s a New Year That means Instead of Saying 2014 on the bottom of your website it says 2014. copyright (c) 2013 Mysite.co.za Well here’s how to make that line dynamic so you need not change it again Zend: <?php $date = new Zend_Date(); echo $date->get(Zend_Date::YEAR); ?> PHP: echo date(“Y”);
PHP Application Level Package Manager: Composer What is Composer? Ever used apt, dpkg, yum? These are package managers for unix systems, they automatically update your server with latest updates and install dependant libraries. Composer does the same thing just for PHP. It allows you to declare the dependant libraries for your project in a: composer.json […]