I'm currently using code that uploads a CSV file but I am using the PATHINFO_EXTENSION to prevent any other file types being submitted (file types other than .csv)
This is the code (with html):
I have the following problem:
==> I initially used $file = $_FILES['csv']['tmp_name']; but the basename came up randomly and the extension was a .tmp even thought the file I uploaded was a .csv I then changed it to $file = $_FILES['csv']['name']; but I got the following error:
Warning: fopen(computing.csv): failed to open stream: No such file or directory in ... Warning: fgetcsv() expects parameter 1 to be resource, boolean given in ...
Please can anyone explain and help what the problem is with the code and I have been searching for a while and cant seem to find a solution.
Any help is appreciated, thanks.
` and post code in question – Naumov Mar 12 '16 at 22:52