deleting files OR dir permisions?
Posted by: tallberg (---.range81-129.btcentralplus.com)
Date: December 15, 2006 06:51PM

Hi i want to delete file in a certain dir.

When i use the following code i am unable to open file in the dir call uploaded.

If this is a permision thing, how do i changing the dir and file permissions on a wamp set up on windows?

$myFile = "dfd.jpg";
$fh = fopen(uploaded/$myFile, 'w') or die("can't open file"winking smiley;
//fclose($fh);

//unlink($myFile);

This the error message.
Warning: Division by zero in C:\wamp\www\httpdocs\catalogue2\unlink.php on line 10
can't open file

Thanks in advance

Options: ReplyQuote
Re: deleting files OR dir permisions?
Posted by: yfastud (---.mia.bellsouth.net)
Date: December 16, 2006 03:13AM

is "dfd.jpg" in the same folder w/ the php file?

Options: ReplyQuote
Re: deleting files OR dir permisions?
Posted by: tallberg (---.range81-129.btcentralplus.com)
Date: December 16, 2006 01:41PM

Managed to resolve the issues by replacing:

$fh = fopen(uploaded/$myFile, 'w')

WITH

$fh = fopen('uploaded/' . $myFile, 'w')

Thanks for replying anyway

Options: ReplyQuote


Sorry, only registered users may post in this forum.