我无法访问它显示的目录“目录访问被禁止”请帮助我,因为我是CI的新手
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['base_url'] = 'emoneygifts.projects-codingbrains.com/index.php';
?>
答案 0 :(得分:0)
来自文档https://codeigniter.com/user_guide/installation/index.html 在您的
application/config/config.php
制作设置中
$config['base_url'] = 'http://'. $_SERVER['HTTP_HOST'] .'/your_project/';
完成后,访问您的网站: http://localhost/your_project/index.php
示例:强>
$config['base_url'] = localhost/Project_name/index.php';
或强>
$config['base_url'] = 'http://'. $_SERVER['HTTP_HOST'] .'/project_name/index.php';