unlink path
- From: Jeff <dont_bug_me@xxxxxx>
- Date: Mon, 26 Jan 2009 11:24:39 -0500
I need to delet some files, so I thought of unlink.
http://us3.php.net/manual/en/function.unlink.php
Now, I'm confused by the path in the example:
<?php
$fh = fopen('test.html', 'a');
fwrite($fh, '<h1>Hello world!</h1>');
fclose($fh);
mkdir('testdir', 0777);
unlink('test.html');
unlink('testdir');
?>
What is that relative to, where the script is run? Or something else?
I assume I can do this:
unlink($_SERVER['DOCUMENT_ROOT']. '/path_relative_to_document_root') ?
Jeff
.
- Follow-Ups:
- Re: unlink path
- From: macca
- Re: unlink path
- From: The Natural Philosopher
- Re: unlink path
- Prev by Date: Re: OT SSL Certificate
- Next by Date: Successful system call output going to error log
- Previous by thread: Re: preg_replace: How to get ...->% or \... -> ... in one call?
- Next by thread: Re: unlink path
- Index(es):
Relevant Pages
|