没有公共文件夹的Laravel URL [英] Laravel url without public folder

查看:74
本文介绍了没有公共文件夹的Laravel URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为项目使用wampserver 我的项目在文件夹sss中 所以我必须输入这个网址localhost\sss\public 想要这个

hi i am using wampserver for my project and my project is in folder sss so i must type this Url localhost\sss\public and want to have this

localhost\sss\

显示我的索引页

推荐答案

将公用文件夹的内容复制到公用文件夹之外,然后打开复制到该文件夹​​之外的index.php,然后进行以下更改:

Copy the public folder contents outside the public folder and open index.php which you copied outside the folder, than change the:

require __DIR__.'/../bootstrap/autoload.php';

$app = require_once __DIR__.'/../bootstrap/start.php';

require __DIR__.'/bootstrap/autoload.php';

$app = require_once __DIR__.'/bootstrap/start.php';

您可以直接访问.

这篇关于没有公共文件夹的Laravel URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆