虚拟主机无法修改运行目录安装方法

ipbao 虚拟主机

发布时间:2021-06-12阅读(2266)


虚拟主机无法修改运行目录安装方法 把public下的文件复制到根目录下 修改 根目录下的 index.php文件

把public下的文件复制到根目录下 

 修改 根目录下的 index.php,admin.php文件 

删除以下内容

$install = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'install.lock';

if(!file_exists($install)){

header('Location: /install/');

die;

}


 修改文件中的引用路径 

如 require __DIR__ . '/../vendor/autoload.php';

 改为 require __DIR__ . '/vendor/autoload.php'; 


 .htaccess 要是针对静态文件资源


<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>


打赏 喜欢(10)
收藏 举报 分享来自:Windows客户端
广告
发表评论
0条评论
首页 问题 发布 文章 话题