note 126793 added to function.unlink
| From: | Ben at main dot php dot net | Date: | Sat, 22 Jan 2022 10:46:53 +0000 |
| Subject: | note 126793 added to function.unlink | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217534@lists.php.net to get a copy of this message | ||
On Windows (XAMPP):
// while here a path with a slash works fine
$indicatorfile = fopen("importinidikator/main-start.txt", "w");
fwrite($indicatorfile, date("Y-m-d H:i:s"));
fclose($indicatorfile);
// unlink only works with backslashes in the path
unlink("importinidikator\main-start.txt");
...took me some time to figure out...
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 84.189.171.122)
----
Manual Page -- https://php.net/manual/en/function.unlink.php
Edit -- https://main.php.net/note/edit/126793
Del: integrated -- https://main.php.net/note/delete/126793/integrated
Del: useless -- https://main.php.net/note/delete/126793/useless
Del: bad code -- https://main.php.net/note/delete/126793/bad+code
Del: spam -- https://main.php.net/note/delete/126793/spam
Del: non-english -- https://main.php.net/note/delete/126793/non-english
Del: in docs -- https://main.php.net/note/delete/126793/in+docs
Del: other reasons-- https://main.php.net/note/delete/126793
Reject -- https://main.php.net/note/reject/126793
Search -- https://main.php.net/manage/user-notes.php