Laravel Server file path Error -
i downloading file google drive , saving locally , later submit url. after fetching file google drive, can access locally. when hosted file path changes in laravel (on pagodabox).
this except of code:
$path_to_save_file = public_path('myuploads/sample.txt'); $xlsfile = file_put_contents($path_to_save_file, file_get_contents($url)); $real_path = realpath($path_to_save_file); echo $real_path;
nb: locally, expected file path. when hosted pagoda, url says /data/public/myuploads/sample.txt
doesn't give me access file posting.
Comments
Post a Comment