你好,我的朋友,我正在进行验证码验证,但是创建时无法获取示例页面
这是我的.htaccess代码
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
这是我的example.php文件,它位于views文件夹中
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<script>
$(document).ready(function () {
$('.refreshCaptcha').on('click', function () {
$.get('<?php echo base_url().'captcha / refresh'; ?>', function (data) {
$('#captImg').html(data);
});
});
});
</script>
</head>
<body>
<h4>Submit Captcha Code</h4>
<p id="captImg">
<?php echo $captchaImg; ?>
</p>
<p>Can't read the image? click
<a href="javascript:void(0);" class="refreshCaptcha">here</a> to refresh.</p>
<form method="post">
Enter the code :
<input type="text" name="captcha" value="" />
<input type="submit" name="submit" value="SUBMIT" />
</form>
</body>
</html>
但是当我连线localhost / capcode / example时,它显示foo:bar我该如何解决?