Sunday, February 12, 2012

Word press Directory URL Tags

home_url() Home URL http://www.example.com
site_url() Site directory URL http://www.example.com or http://www.example.com/wordpress
admin_url() Admin directory URL http://www.example.com/wp-admin
includes_url() Includes directory URL http://www.example.com/wp-includes
content_url() Content directory URL http://www.example.com/wp-content
plugins_url() Plugins directory URL http://www.example.com/wp-content/plugins
wp_upload_dir() Upload base URL in ['baseurl'] entry of returned array http://www.example.com/wp-content/uploads

Tuesday, February 7, 2012

Email Validation Through PHP

function isValidEmail($email){
return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email);
}

Tuesday, November 15, 2011

PHP : Getting filename from a URL

Some time using PHP, you might need to get the path from a URL, leaving behind just the filename at the end of the URL. You can achieve this with a regular expression pattern of course, but here is a much simple way to strip the file name from url using PHP.

Example:


      $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];


      $filename = basename($url);

     echo $filename;
?>
Hope you will enjoy this... :)

Tuesday, April 19, 2011

Changing URL with javascript Element setAttribute( )


Example

Search Engine


Here goes the code


How to change the PHP version for subfolders or subdomains

  How to change the PHP version for subfolders or subdomains Setting a specific PHP version for a specific websites, subfolders or subdomain...