$date2 = ‘2010-06-20’;$date1 = ‘2010-06-24’;$days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24);echo $days; some other ways are also there. can any one … days difference in phpRead more
Uncategorized
Get extension of filename in php
$path_info = pathinfo(‘lib.inc.php’); echo $path_info[‘extension’];
Validate Image Using Javascript
function validate_image(){ frmobj = document.frmRegistration; //Here “frmRegistration” is Form name var image_file = frmobj.upload_file.value; /*Here “upload_file” is in this tag like input type=”file” name=”upload_file” */ … Validate Image Using JavascriptRead more
create dynamic images in php
//Create Image By Url Method – 2function create_image_by_url2($url){ $path_parts = pathinfo($url); copy($url,$path_parts[‘basename’]); }create_image_by_url2($url);
create dynamic images using php
$url = “http://technmarketing.com/wp-content/uploads/2009/03/twitter-wallpaper2.jpg”; //Create Image By Url Method – 1function create_image_by_url1($url){ $target_path = $url; $imgdir=””; $path_parts = pathinfo($url); $file_name = $path_parts[‘basename’]; $imgext = $path_parts[‘extension’]; if($imgext==’jpg’ … create dynamic images using phpRead more
Enable Htaccess in localhost AppServ
Open AppSer installed folder in that find conf folder and find httpd.conf file. In that file find below line(LoadModule rewrite_module modules/mod_rewrite.so) For Example In Windows: … Enable Htaccess in localhost AppServRead more
mysql command line windows
It is working for me like this Set the path in command line to mysqlbin i.e (in which directory mysql is installed) For eg: (I … mysql command line windowsRead more
wordpress mu installation in localhost
I have installed the wordpress mu in localhost. I am using Appserv. Copy the wordpress-mu folder in your root directory with some name as “wpmu”. … wordpress mu installation in localhostRead more
Phpbb3 admin login problem
Admin Login Page For Phpbb3: To Login into admin section you have to re-authenticate for admin account First you have to login from frontend with … Phpbb3 admin login problemRead more
check value exist or not in php array
$os = array(“Novmber, 2009”, “NT”, “Irix”, “Linux”); if (in_array(“Novmber, 2009”, $os)) {echo “You found that value”;}