Turn On PHP error reporting

In a situation I have to turn my hosts php error reporting on from a script. This code really help me installing a old version magento site to new host. I always turn on E_ALL from php.ini but, this is a situation where i can’t access php.ini file so, this works good. ini_set(‘display_errors’,1); error_reporting(E_ALL);

joomla URI

Creating get string in joomla component development. $uri = “index.php?option=com_qc&view=edit”; $u =& JURI::getInstance( $uri ); $params = array( ‘task’ => ‘hello’, ‘data’ => ‘hitoall’ ); $params = array_merge( $u->getQuery( true ), $params ); $query = $u->buildQuery( $params ); $u->setQuery( $query ); $editlnk = $u->toString(); Now, you can write some url redirect code to go to […]

Magento Installation fetal error or a blank page

Run this SQL quires after importing your database. have fun UPDATE `core_store` SET `store_id` = 0 WHERE `code` like ‘admin'; UPDATE `core_website` SET `website_id` = 0 WHERE `code` like ‘admin'; UPDATE `customer_group` SET `customer_group_id` = 0 WHERE `customer_group_code` like ‘NOT LOGGED IN';

NON IE html conditional comment

This html conditional comment will show a div for IE and another div for other browser. like¬† if(IE){… }else{….moz,op,safa,blabla….} . U can use it like a png/gif switcher for IE and other. Code: <!–[if IE]>¬† <div><img src=”logo.gif”> it’s ie </div> <![endif]–> <!–[if IE]><![if !IE]><![endif]–> <div><img src=”logo.png”> it’s non ie, other browser </div> <!–[if IE]><![endif]><![endif]–>