Re: [PHP-DB] unlink problems

[email protected] (Gunawan Wibisono)
Newsgroups php.db
Message-ID <[email protected]>
kesavan is right !!
i see the problem in link..

u type "./blabla.pdf" the main problem is in the "./"
remove the "./"
unless the file you want to remove are in the root



On 11/25/09, Kesavan Rengarajan <[email protected]> wrote:
> Looks like the PDF is not in the admin directory. Try to use the full
> path to the PDF file and also check the permissions on the file.
>
> Sent from my iPhone
>
> On 25/11/2009, at 9:22 PM, Neil Jackson <[email protected]> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi,
>> I use the following to delete a file on a webserver
>>
>>    if( unlink( "./$filename" ) )
>>    {
>>        echo $filename." deleted ";
>>        $action='';
>>        echo
>> "<script>document.location.href='$PHP_SELF?action=$action&code=
>> $code'</script>";
>>    }
>>
>> But I get the following error
>> Warning: unlink(./6 November 2009.pdf): No such file or directory in
>> /srv/www/htdocs/bee_partners/admin/tenders.php on line 82 6 November
>> 2009.pdf not deleted
>>
>> Any help?
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.9 (GNU/Linux)
>> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAksNBV4ACgkQGgk1S8edB3JqWgCfb61pxGvh+KCXNfNdWgF2kb/P
>> xCMAn2dSOgN9AiFYX35Ga00XyxZQwGnw
>> =NL6k
>> -----END PGP SIGNATURE-----
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
akan ada dimana mulut terkunci dan suara tak ada lagi..
saat itu gunakanlah HP untuk melakukan SMS!!
-> ini aliran bedul.. bukan aliran aneh.
tertawa sebelum tertawa didepan RSJ..
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.