I want to upload file in my website ,but when i upload the file isn't enter to folder public html ,
$resorce->move(\base_path() ."public/homepage", $name);
how to change this ?
in shared hosting, i am using laravel 7
Try using the helper method public_path() defined here instead of base_path().
Also not sure if this is a direct copy/paste so I just wanted to point out that there is a typo so I've updated the call below.
$resource->move(public_path().'homepage');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.