jtrudeau
asked on
deleting an uploaded file
no problem deleting it from the database but how do I go about removing from the folder on ther server(linux) please help...
..You wish to remove a file from a server automatically?? Is there a particular language? Does the server have FTP access?
ASKER
all programming was done in php using mysql, this is what I used to upload the file, how do I delete it no lol
<?
$uploaddir = '/home/httpd/vhosts/creati onexpress. com/subdom ains/admin /httpdocs/ cards/';
$uploadfile = $uploaddir . $_FILES['cardFR']['name'];
if (move_uploaded_file($_FILE S['cardFR' ]['tmp_nam e'], $uploadfile)) {
chmod ($uploadfile, 0755);
print("<b>Upload Status:</b> Successful !");
} else {
print("<b>Upload Status:</b> Unsuccessful !");
}
?>
as for ftp acces the server is mine I have full control, please just let me know what I have to do to delete the file once the "delete button" is pressed for a particular record (in my case a product image)
<?
$uploaddir = '/home/httpd/vhosts/creati
$uploadfile = $uploaddir . $_FILES['cardFR']['name'];
if (move_uploaded_file($_FILE
chmod ($uploadfile, 0755);
print("<b>Upload Status:</b> Successful !");
} else {
print("<b>Upload Status:</b> Unsuccessful !");
}
?>
as for ftp acces the server is mine I have full control, please just let me know what I have to do to delete the file once the "delete button" is pressed for a particular record (in my case a product image)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.