CodeIgniter URL
CodeIgniter URLs are SEO well disposed. Rather than utilizing an 'inquiry string' approach, it utilizes a portion based methodology.
Basic URL structure
abc.com/class/work/ID
class speaks to controller class that should be summoned.
function is the technique that is called.
ID is any extra section that is passed to controllers.
What is site_url();
You can pass a string or an exhibit in a site_url() work. Right now pass a string,
reverberation site_url('book/novel/fiction');
The above capacity will return something like this
http://abc.com/index.php/book/novel/fiction
Right now pass an exhibit,
$data = array('book', 'novel', 'fiction');
reverberation site_url($data);
What is base_url();
It restores your site base URL, whenever referenced any, in the config record. On passing base_url(), it likewise restores a similar thing as site_url() with disposing of index.php. This is helpful in light of the fact that here you can likewise pass pictures or content documents. Here additionally you can pass a string or a cluster.
Right now pass a string,
reverberation base_url("book/novel/fiction");
The above capacity will return something like this http://abc.com/book/novel/fiction
What is uri_string();
It restores the URI section of a page. For instance, if your URL is,
http://abc.com/book/novel/fiction
At that point, uri_string() will return
Book/novel/fiction
What is current_url();
Calling this capacity implies, it will restore the full URL of the page as of now saw.
If you don't mind note - > calling this capacity is same as calling uri_string() in site_url().
current_url() = site_url(uri_string());
What is index_page();
It will restore your site's index_page which you have referenced in your config document. As a matter of course, it is consistently index.php document.
You can transform it with the assistance of .htaccess document.
anchor()
It makes a standard HTML interface dependent on your nearby site URL. For instance,
Reverberation anchor('book/novel/fiction', 'My Collection, 'title="book name");
It will give the accompanying outcome,
My Collection
anchor_popup()
It is indistinguishable from grapple() yet it opens the URL in another window.
mailto()
It makes a HTML email connect. For instance,
Reverberation mailto('abc@abc_site.com', 'To get in touch with me click here')
url_title()
It accepts a string as an information and makes a human benevolent condition. For instance,
$title = "CodeIgniter's examples"
$url_title() = url_title($title);
Yield will be "CodeIgniters-models"
In the event that you'll pass a subsequent parameter, it characterizes word delimiter.
$title = "CodeIgniter's examples"
$url_title() = url_title($title, '_');
Yield will be "CodeIgniters_examples"
In the event that you'll pass a third parameter, it characterizes capitalized and lowercase. You have Boolean choices for this, TRUE/FALSE.
$title = "CodeIgniter's examples"
$url_title() = url_title($title, '_', TRUE);
Yield will be "codeigniters_examples"