Aziz Al-ghannam
Aziz Al-ghannam

Reputation: 309

Codeigniter: form_open gave invalid function URL

I used this function to start a form:
echo form_open('email/send');
and after viewing the source I found that form_open returned duplicated index.php :

<form action="http://localhost/ci/index.php/index.php/email/send"
Note:
I tried keeping only this line of code in the page, but still gave me the same result

Edit1:

Base url : $config['base_url'] = 'http://localhost/ci/index.php/';

Upvotes: 0

Views: 1831

Answers (1)

birderic
birderic

Reputation: 3765

What is your index_page configuration item set to? If your base_url and index_page configuration items both include "index.php" then I imagine form_open() would duplicate it.

Change your application/config/config.php to:

$config['base_url'] = 'http://localhost/ci/';

//...

$config['index_page'] = 'index.php';

Upvotes: 5

Related Questions