2
我有位於holiday/app/Console/Commands/myCommand.php
用PHP文件:如何在Laravel應用程序中查找特定文件?
namespace Holiday\Console\Commands;
$bob = file_get_contents('Storage/data/BE.json');
和它的作品。
然而,在holiday/app/Http/Controllers/holidayController.php
我:
namespace Holiday\Http\Controllers;
$bob = file_get_contents('Storage/data/BE.json');
,但我得到
file_get_contents(Holiday/Storage/data/BE.json): failed to open stream:
No such file or directory
有誰知道這是爲什麼?