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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marekful at sziget dot hu
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 22:01:33 2025 UTC