We're working on a converter but How can we remove the file name of the browsed file, not the string typed by the users
Asked
Active
Viewed 203 times
-3
-
1can you add an example of "what do you have" and "what do you expect" ? – rap-2-h Dec 22 '11 at 15:31
-
for example I have here a file named Raw video.avi, my program cannot fetch the file with spaces, so how can I automatically remove spaces from the inputted files. thanks! – Psalms twnTysVn Dec 22 '11 at 15:36
1 Answers
0
This should work for what ever your asking..?
//get the filename
$files = array_values($_FILES);
$filename = isset($files['name'])?$files['name']:$files[0]['name'];
//replace space
echo str_replace(' ','',$filename);

paulcol.
- 2,910
- 1
- 21
- 19
-
Thanks for the response but where can I put the code? before or after the process? – Psalms twnTysVn Dec 22 '11 at 22:18