vendredi 13 octobre 2017

how to get file in file importing using laravel php on server hosting or cloud hosting

When I want to read file and import to database, In local , can find and read file using following code.

        $path = $request->file('import_file')->getRealPath();           
                    $data = Excel::load($path, function($reader) {
                        $reader->noHeading();
                    })->get();

But, server hosting or cloud hosting,it shows error as "Cannot read file.File does not exist!".

Please help me how to fix this issue.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire