base_url and form_open give different output url

I have noticed that base_url('whatever') gives url without index.php for example:


form_open('whatever'); gives url with index.php, example

I believe it should be standardized.

It is standardized. If you remove the index_page option in your config.php config, then form_open() and base_url() will give the same result.

However, since form_open() basically acts as site_url() it must include index.php for sites that don't have .htaccess with mod-rewrite enabled Wink

form_open() uses site_url(), not base_url(). They are different functions for different purposes. Check the URL helper user guide page.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.