Ave,

Richard... What exactly did you mean by this?

system('rm -rf',$user_dir,$ret_val);

I don't understand.



On 8/23/04 12:11 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote:

> system('rm -rf',$user_dir,$ret_val);
> 
> On Mon, 23 Aug 2004 11:57:35 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote:
>> Ave,
>> 
>> I do not really know what the problem is because I don't get an error, and
>> in fact my scripts execute fine... Except that, niether is the directory
>> deleted, nor is the file deleted. Only corresponding database entries are
>> deleted which I specify in my SQL code.
>> 
>> There are 2 different functions in 2 separate places in my File Manager.
>> 1 function deletes the User including his Folder
>> The other deletes a particular file.
>> 
>> The code I'm using to delete the User & his Folder is:
>> 
>> <?php
>> if($delete_user) {
>> $db = mysql_connect("localhost","usr","pwd");
>> mysql_select_db("mydb",$db);
>> $sql = "DELETE FROM user where login = '$user'";
>> $result = mysql_query($sql) or die("There is a problem.");
>> $sql2 = "DELETE FROM file where login = '$user'";
>> $result2 = mysql_query($sql2) or die("There is a problem.");
>> rmdir (imsafm/$user);
>> echo "<br><b><i><small>User $user deleted.</small></i></b><br>";
>> }
>> ?>
>> 
>> The name of Folder of a user is the same as his Login.
>> Anyhow... The above code doesnıt generate any error, and in fact does delete
>> the database entries from the table... But it doesnıt remove the userıs
>> directory. Why is that?
>> 
>> Similarly, this is the code for deleting the file:
>> 
>> <?php
>> $db = mysql_connect("localhost","usr","pwd");
>> mysql_select_db("mydb",$db);
>> $sql = "DELETE FROM file where ID = '$ID'";
>> $result = mysql_query($sql) or DIE("Cannot Do!");
>> unlink($P/$F);
>> echo "<center>File Deleted</center>";
>> ?>
>> 
>> Again, no error... The entries in the table get deleted.. But file remains
>> in the directory.
>> 
>> Any suggestions?
>> 
>> 
> 

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

Reply via email to