当前位置:网站首页>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
边栏推荐
- 【知识小结】PHP使用svn笔记总结
- 喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
- MySQL中, 如何查询某一天, 某一月, 某一年的数据
- JS 模块化
- PHP实现执行定时任务的几种思路详解
- Markdown formula editing tutorial
- 讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!
- Unity3D_ Class fishing project, bullet rebound effect is achieved
- 保证接口数据安全的10种方案
- Shader_ Animation sequence frame
猜你喜欢
![Unity drawing plug-in = = [support the update of the original atlas]](/img/b0/92114ffb1f168a1f27125db46c6797.jpg)
Unity drawing plug-in = = [support the update of the original atlas]

How does geojson data merge the boundaries of regions?

You Yuxi, coming!

Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models

喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配

Three. JS introductory learning notes 11:three JS group composite object

强化实时数据管理,英方软件助力医保平台安全建设

深度之眼(六)——矩阵的逆(附:logistic模型一些想法)

Three. JS introductory learning notes 08:orbitcontrols JS plug-in - mouse control model rotation, zoom in, zoom out, translation, etc

保证接口数据安全的10种方案
随机推荐
Asyncio concept and usage
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
Unity drawing plug-in = = [support the update of the original atlas]
laravel构造函数和中间件执行顺序问题
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)
10 schemes to ensure interface data security
js中复选框checkbox如何判定为被选中
iptables只允许指定ip地址访问指定端口
Limit of total fields [1000] in index has been exceeded
Unity3d click events added to 3D objects in the scene
【知识小结】PHP使用svn笔记总结
目标跟踪常见训练数据集格式
平衡二叉树(AVL)
Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
[excelexport], Excel to Lua, JSON, XML development tool
Enterprise log analysis system elk
尤雨溪,来了!
Apache Doris just "graduated": why should we pay attention to this kind of SQL data warehouse?
Three. JS introductory learning notes 0: illustration of how webgl and threejs work