php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18056 special characters in dir of file names
Submitted: 2002-06-28 21:06 UTC Modified: 2002-06-28 21:15 UTC
From: marekful at sziget dot hu Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.2.1 OS: Red Hat 7.2 Kernel 2.4.9.-31
Private report: No CVE-ID: None
 [2002-06-28 21:06 UTC] marekful at sziget dot hu
If there is an  "&" or  "'" in any file or directory names
opendir or any other filesystem functions like rename or unlink will fail.

Would you please send me some feedback on this problem?

Thank you: Marcell F?l?p

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-28 21:07 UTC] marekful at sziget dot hu
If there is an  "&" or  "'" in any file or directory names
opendir or any other filesystem functions like rename or unlink will
fail.
 [2002-06-28 21:15 UTC] sniper@php.net
Marking as bogus..works fine here. 

Try this:

<?php
$t = opendir('.');
while ($line = readdir($t)) {
  var_dump($line);
  echo "\n";
}
closedir($t);
?>

Works fine here with any wierd filenames, directory..etc.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 19:01:31 2024 UTC