Archive for the ‘PHP’ Category

ErrorDocument 404 [PAGE_NAME or PAGE PATH] eg. ErrorDocument 404 /notfound.html

jQuery Uploadify

Posted: February 13, 2011 in PHP

Sample code for uploading images one by one using uploadify ============================= var fileQueue = new Array(); $(document).ready(function() { $(“#uploadify”).uploadify({ ‘uploader’: ‘/Content/Js/uploadify.swf’, ‘script’: ‘/Upload/ImageWithPreview’, ‘cancelImg’: ‘/Content/Images/cancelUpload.png’, ‘fileDesc’: ‘Image Files’, ‘multi’: true, ‘fileExt’: ‘*.jpg;*.jpeg;*.gif;*.png’, ‘onSelect’: function(event, queueID, fileObj) { fileQueue.push(queueID); }, ‘onCancel’: function(event, queueID, fileObj) { for (i = 0; i 0) { var next = fileQueue.pop(); [...]

/* * Author : Rajan Maharjan * Website : http://www.rajanmaharjan.com.np * Created Date : 26th September, 2010 * Description : This function gives the numeric value for the hex color code. * @param : 99ccff | 99CCFF | 9cf * example : hexColor2Numeric(“9cf”); */ $arrayStoreColor=hexColor2Numeric(“99cacff”); print_r($arrayStoreColor); function hexColor2Numeric($colorHex){ if(strlen($colorHex)==6 || strlen($colorHex)==3){ $arrayKey=array(“red”,”green”,”blue”); $arrayStoreColor=array(); for($i=0;$i<3;$i++){ if(strlen($colorHex)==6){ [...]