Sunday, July 15, 2012

Save Your PHP in UTF-8 Format Without BOM

BOM or byte order mark is to indicate the byte order of your file. If your PHP file contains non-English characters, UTF-8 formatted PHP file will display as question mark(?) if the PHP script is run on Linux/Apache web service platform. However, no problem is found on Windows/IIS web servers. You can run the following PHP codes to check whether your PHP got BOM: <?php $handle = fopen('yourfilename.php','r'); ...
Read More »

Adding PHPExcel PEAR Library in Shared Hosting Environment

You need to have the PEAR library installed in your shared host/server before this. If you haven't done so, you can check out my earlier post on how to do this. The Steps I used: You can download the PHPExcel here. Choose the PEAR version. As of now, the current version is 1.77 and the file size for the .tgz file is 11.7MB. Extract the .tgz file. You'll see a PHPExcel.php and a PHPExcel folder. Like other PEAR add-ons, you just need to copy the PHP file and the folder to your PEAR...
Read More »

Install PEAR for Shared Hosting

PEAR is undeniably a good source of PHP code library that will make programmers' life a lot easier. Installing PEAR on Windows/IIS platform is easy especially when you have admin access to your PC/server. When it comes installing PEAR in a shared hosting environment, admin access is null and there are workarounds that need to be addressed in order to use the PEAR library in the restricted platform. Here are the steps I use: Go to http://pear.php.net/go-pearCopy the content and save...
Read More »