php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39550 unlink() does not work if filename contains parenthesis.
Submitted: 2006-11-17 22:42 UTC Modified: 2006-11-20 15:43 UTC
From: andy at advancethermal dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 5.2.0 OS: Windows XP Pro & 2003 Server
Private report: No CVE-ID: None
 [2006-11-17 22:42 UTC] andy at advancethermal dot com
Description:
------------
unlink() does not delete a file if the filename contains parenthesis, while functions like file_get_contents() work fine.

Reproduce code:
---------------
$file = "c:/my file (4).txt";

unlink($file);

Expected result:
----------------
Expect file to be deleted.

Actual result:
--------------
File is not deleted.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-20 10:00 UTC] tony2001@php.net
Do you see any error messages with error_reporting(E_ALL)? If yes, please post all of them here.
 [2006-11-20 15:43 UTC] andy at advancethermal dot com
Okay, I have no idea why, but both servers can delete files with parenthesis now. Please consider the issue as closed/bogus.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 05:05:55 2022 UTC