cant delete folders or files once created in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

cant delete folders or files once created in php

Post by reecec »

Hi

i have created a few folders in php and a few files but i cant delete them in cpanel.

does anyone know why


heres the code for creating a dir

Code: Select all

function SetupFolder($dir_name)
{
   mkdir($dir_name, 0777);
   $folder = opendir($dir_name);
   if (!$folder)
{
die ("Folder '$dir_name' not created");
}
}

$set=SetupFolder($accountsetting);

thanks reece
User avatar
Jaxolotl
Forum Contributor
Posts: 137
Joined: Mon Nov 13, 2006 4:19 am
Location: Argentina and Italy

Post by Jaxolotl »

Did you check CHMOD and CHOWN?
seem to be a permission conflict... can you provide us the error message or log?
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

Post by reecec »

hi thanks for your reply

when i tryed to edit one of the files this is the message
[a fatal error or timeout occurred while processing this directive]

thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Use PHP to remove them.
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

Post by reecec »

thanks that was the only way to delete them
Post Reply