yaf把index.php移到public 目录下

版权声明:廖圣平博客,未经博主允许不得转载。企鹅:1194008361 https://blog.csdn.net/qq_22823581/article/details/87287995

application 目录下创建public
把index.php 移动到public
如果是apche 把.htaccess也移进去

修改index.php
define('APPLICATION_PATH', dirname(__FILE__));
替换成:

define('APPLICATION_PATH', str_replace(['/public','\public'],'',dirname(__FILE__)));

即可

可下载 我的index.php
https://download.csdn.net/download/qq_22823581/10957597

没有更多推荐了,返回首页