当前位置:网站首页>How can laravel get the public path
How can laravel get the public path
2022-07-07 16:20:00 【Full stack programmer webmaster】
app_path()
app_path The function returns app The absolute path to the directory :
$path = app_path();
You can still use it app_path The function is relative to app The given file of the directory generates an absolute path :
$path = app_path('Http/Controllers/Controller.php');
base_path()
base_path Function returns the absolute path of the project root directory :
$path = base_path();
You can still use it base_path The function generates an absolute path for a given file relative to the application directory :
$path = base_path('vendor/bin');
config_path()
config_path Function returns the absolute path of the application configuration directory :
$path = config_path();
database_path()
database_path Function returns the absolute path of the application database directory :
$path = database_path();
public_path()
public_path The function returns public The absolute path to the directory :
$path = public_path();
storage_path()
storage_path The function returns storage The absolute path to the directory :
$path = storage_path();
You can also use storage_path Function generation relative to storage The absolute path of the given file of the directory :
$path = storage_path('app/file.txt');
obtain laravel The built-in help functions of the project path are basically here
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/113203.html Link to the original text :https://javaforall.cn
边栏推荐
- Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
- 2022第四届中国(济南)国际智慧养老产业展览会,山东老博会
- Sysom case analysis: where is the missing memory| Dragon lizard Technology
- Laravel 中config的用法
- torch.numel作用
- 分类模型评价标准(performance measure)
- U3D_ Infinite Bessel curve
- Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
- Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
- MySQL中, 如何查询某一天, 某一月, 某一年的数据
猜你喜欢
Numpy --- basic learning notes
SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
Three. JS introductory learning notes 08:orbitcontrols JS plug-in - mouse control model rotation, zoom in, zoom out, translation, etc
Three. JS introductory learning notes 18: how to export JSON files with Blender
山东老博会,2022中国智慧养老展会,智能化养老、适老科技展
Continuous creation depends on it!
记一次项目的迁移过程
Three. JS introductory learning notes 11:three JS group composite object
2022第四届中国(济南)国际智慧养老产业展览会,山东老博会
持续创作,还得靠它!
随机推荐
Statistical learning method -- perceptron
修改配置文件后tidb无法启动
Rongyun won the 2022 China Xinchuang digital office portal excellence product award!
Unity3D_ Class fishing project, bullet rebound effect is achieved
You Yuxi, coming!
10 schemes to ensure interface data security
PHP实现执行定时任务的几种思路详解
Laravel 中config的用法
【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
C4D learning notes 3- animation - animation rendering process case
用手机在通达信上开户靠谱吗?这样炒股有没有什么安全隐患
pycharm 终端部启用虚拟环境
融云斩获 2022 中国信创数字化办公门户卓越产品奖!
Sysom case analysis: where is the missing memory| Dragon lizard Technology
Shader basic UV operations, translation, rotation, scaling
Three. JS introductory learning notes 10:three JS grid
Dotween -- ease function
Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import
神经网络c语言中的指针是怎么回事
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)