我使用URL :: base(); 我得到这个网址:
http://www.kp.com.mx/sis_colgate/public
Run Code Online (Sandbox Code Playgroud)
但我需要的是这条完整的道路:
/home/belendez/public_html/sis_colgate/public
Run Code Online (Sandbox Code Playgroud)
有谁知道我怎么能走那条路?谢谢
Dei*_*ite 15
你想要使用的是path帮手.
URL帮助程序用于生成HTTP URL.
尝试使用path('public')Laravel 3中的功能,
或public_path()Laravel 4中的功能.
编辑:更新了Laravel 4的答案,感谢Erin
yes*_*nik 13
Laravel 有路径助手:
base_path(); // '/var/www/mysite'
app_path(); // '/var/www/mysite/app'
storage_path(); // '/var/www/mysite/storage'
Run Code Online (Sandbox Code Playgroud)