Codeigniter 注销后,图像不会显示在登录视图中
这是我目前的代码Codeigniter 注销后,图像不会显示在登录视图中,codeigniter,Codeigniter,这是我目前的代码 <?php echo form_open('login/validate_credentials'); echo '<img src="img/too.png" style="height: 30px">'.form_input( 'username', ''); echo '<img src="img/pwd.png" style="height: 30px">'.form_password('p
<?php
echo form_open('login/validate_credentials');
echo '<img src="img/too.png" style="height: 30px">'.form_input( 'username', '');
echo '<img src="img/pwd.png" style="height: 30px">'.form_password('password', '');
echo '<br>';
echo form_submit('submit', 'Login');
echo form_close();
?>
您应该使用HTml帮助程序来显示
echo form_open('login/validate_credentials');
echo img(数组('src'=>'img/too.png','height'=>'30px'))。表格输入('username','');
echo img(数组('src'=>'img/pwd.png','height'=>'30px'))。表单密码('password','';
回声“
”;
回显表单提交(“提交”、“登录”);
回声形式_close();
试试这个
<form method="post" action="<?php echo base_url();?>login/validate_credentials">
<img src="<?php echo base_url('imagepath');" style="height: 30px">
<input type="text" name="username" id="username" value="">
<img src="img/pwd.png" style="height: 30px">
<input type="password" name="password" id="password" value="">
<input type="submit" name="Login">
<form method="post" action="<?php echo base_url();?>login/validate_credentials">
<img src="<?php echo base_url('imagepath');" style="height: 30px">
<input type="text" name="username" id="username" value="">
<img src="img/pwd.png" style="height: 30px">
<input type="password" name="password" id="password" value="">
<input type="submit" name="Login">