How to get Controller, Action, URL informations with CodeIgniter

I have these urls:

How to get controller name, action name from these urls. I’m codeigniter newbie. Are there any helper function to get this info.

You could use the URI Class:

$this->uri->segment(n); // n=1 for controller, n=2 for method, etc

There is an optional second parameter that permits you to set your own default value if the segment is missing. For example, we could use

 $controllerName = $this->uri->segment(1, 'magazine');  

I’ve also been told that the following work, but am currently unable to test:

$this->router->fetch_class();
$this->router->fetch_method();

Convert plain text url’s to clickable links

Just copy this function and make your links clickable

function plain_url_to_link($string) {
    return preg_replace(
    '%(https?|ftp)://([-A-Z0-9./_*?&;=#]+)%i',
    '<a target="blank" rel="nofollow" href="$0" target="_blank">$0</a>', $string);
}
$str = "https://www.google.com is a search website, you can also visit yahoo.com and http://twitter.com";
echo plain_url_to_link($str);

Get the URL, time and content in WordPress without displaying it

The URL’s of our posts in WordPress looks like: http://blogbysid.wordpress.com/2013/04/26/creating-google-oauth-api-keys-and-developer-key/

Using the_permalink() would generate the link but if you want to get the link only and don’t want it to get displayed, what should we do ?

A lot of of the WordPress function have ‘return’ alternates using get as the operative word.

get_the_permalink() - To get the link
get_the_time() - To get the time
get_the_content() - To get the content

How to remove index.php from url in magento

In Magento if you are getting the url as http://website.com/index.php/electronics/cell-phones.html and you want that index.php is not written on the url i.e. http://website.com/electronics/cell-phones.html.

Then use the following steps:

1) Login to admin section by using the URL
http://website.com/index.php/admin/

2) Then go to “System >>  Configuration >>Web >> Search Engines Optimization”
Use Web Server Rewrites : YES

3) Go to “System >>  Configuration >>Web >>Secure”
Use secure URL Frontend: YES