Link to home
Start Free TrialLog in
Avatar of jtrudeau
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...
Avatar of InteractiveMind
InteractiveMind
Flag of United Kingdom of Great Britain and Northern Ireland image

..You wish to remove a file from a server automatically?? Is there a particular language? Does the server have FTP access?
Avatar of jtrudeau
jtrudeau

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/creationexpress.com/subdomains/admin/httpdocs/cards/';
$uploadfile = $uploaddir . $_FILES['cardFR']['name'];
if (move_uploaded_file($_FILES['cardFR']['tmp_name'], $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)
ASKER CERTIFIED SOLUTION
Avatar of bozoka45
bozoka45

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial