Re: unlink()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5 June 2010 23:45, tedd <tedd@xxxxxxxxxxxx> wrote:
> Hi gang:
>
> I use unlink() to delete files on my server by using the statement:
>
> unlink($filename);
>
> where $filename is the physical path to the file plus file name, such as:
>
> $filename = '/var/www/vhosts/domain.com/httpdocs/a-dir/a-text.txt';
>
> Now, I can read, write, and even create the file -- so I have the path and
> permissions correct. But if I unlink() the file and then examine the
> contents of the parent directory afterwards, I find the file remains --
> what's up with that?
>
> This reminds me of the process of deleting files on your local hard disk,
> which basically sets the disk-space allocated to the file as "available for
> writing" without actually deleting the file.
>
> So what am I not understanding here?
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

What is the result of the unlink()? Enable errors/warnings.



-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux