我是Codeigniter框架的新手。我在代码中遇到问题href链接。它在localhost上运行良好,但在服务器上却无法运行。我网站的所有页面都运行良好。表单属性操作触发器起作用,但下面提到href链接不起作用,并且未调用控制器中的注册功能。请提出前进的方向。
1.Href链接调用“ signup()”-无效
<form action='<?= base_url();?>index.php/login/admin_validate_credentials' method="post" name="login-form" id="login-form" role="form" autocomplete="off">
2.Form属性“ action”(调用“ admin_validate_credentials()”)-运行良好
npm install --save mongoose
答案 0 :(得分:0)
希望这对您有帮助:
首先在base url
中设置config.php
,如下所示:
// change testing with your folder name
$config['base_url'] = 'http://localhost/testing/';
然后像这样在锚点中使用site_url
:
注意 :确保您的Login controller
应该具有signup
方法
<a href="<?=site_url('login/signup');?>" class="btn btn-success">
<span class="glyphicon glyphicon-plus-sign"></span> Add Student Account
</a>