php - codeignitor's anchor() method fails to hit method name specified in controller -


i want link anchor method "newinvoice()" specified in controller

<?php $this->load->helper('url'); ?> <li><?php echo anchor('new_invoice_c/newinvoice', 'new     invoice'); ?></a> </li> 

controller

class new_invoice_c extends ci_controller {     public function newinvoice()     {        $this->load->view('new_invoice');     } } 

the problem anchor() not returning full string (when check via "view page source) upto first paraemeter i.e. method name follows.

<a href="http://localhost/cibs/index.php/new_invoice_c"> 

when renamed mehtod index() view loaded successfully.

it may seem naive here tried

echo anchor(site_url('new_invoice_c.php/newinvoice'), 'new invoice'); echo anchor('new_invoice_c.php/newinvoice', 'new invoice'); 

beside refresh page after clearing chache still unable figure out.

change

<li><?php echo anchor('new_invoice_c/newinvoice', 'new     invoice'); ?></a> </li> 

to

<li><?php echo anchor('new_invoice_c/newinvoice', 'new invoice'); ?></li> 

you added </a> not required


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -