致Great 发表于 2017-1-17 00:22:42

base_url怎么把[::1]改成localhost

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<h1>我的首页</h1>
<?php echo base_url()?>
</body>
</html>

运行结果是下面的;

我的首页http://[::1]/graduate/


怎么把base_url改成ip4的localhost

Closer 发表于 2017-1-17 09:48:42

config/config.php
設定 $config['base_url']

致Great 发表于 2017-1-17 19:30:29

Closer 发表于 2017-1-17 09:48
config/config.php
設定 $config['base_url']

改了之后不能加载css,但是[::1]可以加载css。。。。

致Great 发表于 2017-1-17 20:46:25

问题已解决http://stackoverflow.com/questions/34025305/ip-address-is-showing-in-form-action-with-codeigniter-http-1-codeigniter-in

Hex 发表于 2017-1-18 11:58:35

致Great 发表于 2017-1-17 19:30
改了之后不能加载css,但是[::1]可以加载css。。。。

改这个是必须要做的,然后再看为什么改了之后 CSS 不行。一般来说,如果不做 url rewrite 不可能会导致 CSS 访问不了。
页: [1]
查看完整版本: base_url怎么把[::1]改成localhost