0
我將我的視頻放到我的共享Web主機上,用戶可以直接下載所有文件。但我想隱藏我的實際文件路徑並製作時間有限的下載鏈接。 如果文件在同一臺服務器上,它工作正常。 當我使用此代碼:如何生成下載鏈接位於laravel中另一臺服務器上的文件
return response()->download('/home2/alihoss1/domains/alihossein.ir/public_html/dl/video/MySql/Sql1.mp4');
我看到這個錯誤:
is_file(): open_basedir restriction in effect. File(/home2/alihoss1/domains/alihossein.ir/public_html/dl/video/MySql/Sql1.mp4) is not within the allowed path(s): (/home2/alihosse/domains/alihossein.ir/:/tmp/:/usr/local/php-7.0/lib/php/)
,你會推薦什麼解決辦法嗎? 視頻和laravel項目不是同一個主機。
可能出現[open \ _basedir限制有效。文件(/)不在允許的路徑中:](http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-路徑) – user3158900