当前位置:网站首页>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
边栏推荐
- PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
- How to implement backspace in shell
- 谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
- 95. (cesium chapter) cesium dynamic monomer-3d building (building)
- 修改配置文件后tidb无法启动
- js中复选框checkbox如何判定为被选中
- Logback logging framework third-party jar package is available for free
- Common training data set formats for target tracking
- Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?
猜你喜欢

持续创作,还得靠它!

平衡二叉树(AVL)

Apache Doris刚“毕业”:为什么应关注这种SQL数据仓库?

Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?

Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation

Xcode Revoke certificate

Sysom case analysis: where is the missing memory| Dragon lizard Technology

Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)

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

喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
随机推荐
Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?
神经网络c语言中的指针是怎么回事
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
分步式監控平臺zabbix
Three. JS introductory learning notes 15: threejs frame animation module
Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
深度之眼(七)——矩阵的初等变换(附:数模一些模型的解释)
How does geojson data merge the boundaries of regions?
Leetcode-231-2的幂
You Yuxi, coming!
Bidding announcement: 2022 Yunnan Unicom gbase database maintenance public comparison and selection project (second) comparison and selection announcement
What about the pointer in neural network C language
Continuous creation depends on it!
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
Use moviepy Editor clips videos and intercepts video clips in batches
Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)
Odoo integrated plausible embedded code monitoring platform
10 schemes to ensure interface data security
【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
Laravel 中config的用法