Reputation: 104
I've PHP code like that
<form action="" method="POST">
<input type="file" name="asdf">
<input type="submit" name="submit" value="submit">
</form>
<?php
$file = $_POST['asdf'];
$file2 = realpath($file);
$file3 = str_replace('\\','/',$file2);
echo $file3;
?>
I'm stuck at when I using IE to run this script ex I choose file = 'D:\myfolder\folder1\filename.txt'
the code isn't going error. But when I using Firefox or Chrome, there are nothing giving me result.
Upvotes: 0
Views: 111