sudo apt-get install php5
Tag Archives: PHP
Load tinymce editor on client side – Joomla
<?php $editor =& JFactory::getEditor(); echo $editor->display( 'story', $story , '600', '300', '5', '2' ); ?>
How to get prefix of tables in Joomla site
<?php $dVar=new JConfig(); echo $dVar->dbprefix //jos_ ?>
How to check whether the user is logged in or not – Joomla
<?php $user = & JFactory::getUser(); if($user_id=$user_id=$user->get('id')) echo "Logged in user" ?>
Find out the user id of the logged in user – Joomla
<?php $user = & JFactory::getUser(); echo $user_id=$user_id=$user->get('id'); ?>
How to decode the data – PHP
<?php $enData =base64_encode("First"); echo base64_decode($enData);//First ?>
How to encode the data – PHP
<?php echo base64_encode("First"); ?>
How to check whether a file exists or not – PHP
<?php if(file_exists($filePath)) echo "Exists" ?>
How to delete a file – PHP
<?php unlink("../".$deleteFilePath) or die("could not delete the file"); ?>
How to terminate the current script – PHP
<?php chmod("../".$image_thumb_path_medium,0777) or die("Could not change permission thumb"); chmod("../".$image_thumb_path_medium,0777) or exit("Could not change permission thumb"); ?>