I tried the following code :
$contents = File::get(storage_path('files\In\/'.$filename));
foreach($contents as $line) {
echo $line. "working \n";
}
Here $contents returning string not array.
Error :
"Invalid argument supplied for foreach()"
when I var_dump data it returns the following result :
string 'A, B, V<B ,B b B a sdasd' (length=31)
via Chebli Mohamed

Aucun commentaire:
Enregistrer un commentaire