Tag: php

How to create Virtual Hosts PHP | Apache ?

Focus Web Developer should have a requirement to work on various environment . Some projects are in plain php, some are in Framework like CodeIgniter, Symfony .. These all need different configuration and sometime need to use htaccess mode rewrite

Tagged with: , , , , , , ,

How To enable mod_rewrite on Xampp

Search For httpd.conf file and uncomment this line #LoadModule rewrite_module modules/mod_rewrite.so LoadModule rewrite_module modules/mod_rewrite.so Restart your Server create a .htaccess file on your server root put this code RewriteEngine On RewriteBase / RewriteRule ^contact-us$ index.php

Tagged with: , , ,

PHP MYSQL Tips and Tricks

This is a small article containing tricks and tips I aquired by reading PHP 6 Text Book. I was used isset() function to check whether these arguements are set or not. And also I need to check this is empty or

Tagged with: , , ,

PHP:: How to split a large array in small pieces :: or split array into chunks

Hello All, Yesterday i was searching for a solution to split large array into small pieces. Suddenly i noticed the that php have a built in function to split array into small pieces. It was very surprise to me ..

Tagged with: , ,

PHP code to find Duration of an Audio File

Here is the PHP function to calculated duration of “wav” or “GSM” files First we open file using fopen. After we calculate the size of that file (inbytes) using filesize(). Then we unpack the audio File . unpack(‘vtype/vchannels/Vsamplerate/Vbytespersec/valignment/vbits’,$rawheader); This will

Tagged with: , ,

Beta Version of Zend Application Server released

Zend Server Zend Server is a commercial, enterprise-ready Web Application Server that is designed for running and managing business-critical PHP applications in production. It includes advanced performance optimization, application monitoring and application problem diagnostic capabilities.  Zend Server users receive comprehensive

Tagged with: , ,

Export Database to Excel or CSV File

The below code help you to export data from database to csv file exporttoxls To export a complete database, you should invoke all the tables via below code and apply the above code $dbname = ‘mysql_dbname’; if (!mysql_connect(‘mysql_host’, ‘mysql_user’, ‘mysql_password’))

Tagged with: , , , , ,

Simple Mail From PHP

Simple Email Program <?php $to = ‘nobody@example.com’; $subject = ‘the subject’; $message = ‘hello’; $headers = ‘From: webmaster@example.com’ . “\r\n” . ‘Reply-To: webmaster@example.com’ . “\r\n” . ‘X-Mailer: PHP/’ . phpversion(); mail($to, $subject, $message, $headers); ?> Email With MIME Content <?php

Tagged with: , ,