1 year ago

Shared hosting uploading images

Posted 1 year ago by spacedog4

I'm using a shared hosting to my website, so the content of public folder is on www and the project is in a folder named laravel outside of it.

The problem is, everything is working well instead of my image upload, here is where I write the file

file_put_contents(public_path() . '/upload' . $dir . $name_save, $data)

but instead of saving it on www/upload it saves in laravel/public/upload so when I try to call my image it doens't work cause it can't find the image

What am I missing?

Please sign in or create an account to participate in this conversation.