当前位置:网站首页>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
边栏推荐
- Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
- 95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
- 2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
- How to determine whether the checkbox in JS is selected
- 安科瑞电网智能化发展的必然趋势电力系统采用微机保护装置是
- Odoo integrated plausible embedded code monitoring platform
- 企业级日志分析系统ELK
- AE learning 02: timeline
- 航天宏图信息中标乌鲁木齐某单位数据库系统研发项目
- How does geojson data merge the boundaries of regions?
猜你喜欢

SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术

Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!

Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping

Numpy -- data cleaning

Logback日志框架第三方jar包 免费获取

融云斩获 2022 中国信创数字化办公门户卓越产品奖!

95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)

持续创作,还得靠它!

Numpy --- basic learning notes

SPI master RX time out interrupt
随机推荐
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
Common training data set formats for target tracking
C4D learning notes 1- animation - animation key frames
hellogolang
分类模型评价标准(performance measure)
Three. JS introductory learning notes 11:three JS group composite object
Three. JS introductory learning notes 19: how to import FBX static model
Iptables only allows the specified IP address to access the specified port
Asyncio concept and usage
融云斩获 2022 中国信创数字化办公门户卓越产品奖!
Step by step monitoring platform ZABBIX
Logback logging framework third-party jar package is available for free
Three. JS introductory learning notes 18: how to export JSON files with Blender
PHP实现微信小程序人脸识别刷脸登录功能
Leetcode-136- number that appears only once (solve with XOR)
What else can an ordinary person do besides working in a factory to make money?
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
【知识小结】PHP使用svn笔记总结
How to query the data of a certain day, a certain month, and a certain year in MySQL