在提交表单时重定向到http:// [:: 1] / dashboard / [重复]

This question already has an answer here:

Today out of the blue I have started getting redirected to http://[::1]/dashboard/ on my website in localhost when I click to submit a form. I have no idea whats going on. It was working fine just a few hours ago and I have changed nothing in the code.

This is the form's opening and closing tags:

<form action="<?= site_url('Buyer_Controller/view_cart') ?>" method= "post">

<input type="image" src="<?php echo base_url('assets/img/a2c.jpg');?>"  />
</div>

Have set ur base_url properly?

For reference, see this post: site_url changes localhost to [::1]

You can set one global config variable.

If you are redirected to the XAMPP dashboard, do the following:

$config['base_url'] = 'http://localhost/yourproject/';
$config['base_url'] = 'http://www.example.com/';