Try using on of Laravel Helper functions to provide the absolute PATH to your uploads/ folder
File or Image do not save in cPanel live server but save in local host
I have used this code to save image or file:
$image1 = Input::file('deducted_file' . $i); $destination = 'uploads/';
if ($image1 != null) {
$filename1 = Str::lower(
pathinfo($image1->getClientOriginalName(), PATHINFO_FILENAME)
. '-'. uniqid(). '.'. $image1->getClientOriginalExtension()
);
$image1->move($destination, $filename1);
$feesadditional->deducted_amount_file = $filename1;
}
it works in local host but do not work in cPanel live server that is it do not give any error when i choose and save a file or image but it saves nothing in database. In local host I changed php ini file to file enable true. I think I have to enable it in cPanel but I dont know how to change this php.ini file in cPanel.
Thank you for your reply , yes in server there are several problems one of them is real path , i changed it and also it is necessary to change the php version in cPanel . And at last i have succeed to save image in server.
Please or to participate in this conversation.