CodeIgniter URL helper

echo site_url('gallery/landscape/777/'); // returns ''
echo base_url('/css/style.css'); // same as site_url but without the 'index_page' or 'url_suffix'
echo current_url(); // returns the full URL of the currently viewed page (including segments)
echo uri_string(); // returns '/gallery/landscape/777/' on page ''
echo anchor('gallery/listing', 'View gallery listing'); // HTML anchor link
echo mailto('', 'Contact author by email'); // email link
echo safe_mailto('', 'Contact author by email'); // javascript obfuscated version of email link
$string = auto_link($string); // automatically turns URLs and email addresses contained in a string into links
redirect( site_url('users/login/') ); // redirects to page

Leave a Reply

Your email address will not be published. Required fields are marked *