user8124226
user8124226

Reputation: 104

PHP realpath not work at Firefox and Chrome?

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

Answers (0)

Related Questions