ParK Posted September 10, 2006 Share Posted September 10, 2006 this is my delete.php[code]<?php$doc_root=("../il-uploads/"); //main dir$file=$_FILES['uploadedfile']['tmp_name'];$fp = @fopen("../il-uploads/".$file,'r');//open it @fclose($fp);@unlink($doc_root.'/'.$file);?>[/code] not working :( any suggestion or help ? Quote Link to comment Share on other sites More sharing options...
HuggieBear Posted September 10, 2006 Share Posted September 10, 2006 What are you trying to do, open the file and then delete it?RegardsRich Quote Link to comment Share on other sites More sharing options...
°°Ben³ Posted September 10, 2006 Share Posted September 10, 2006 Remove the @ and hope that an error message is put out. ;D Quote Link to comment Share on other sites More sharing options...
JayBachatero Posted September 11, 2006 Share Posted September 11, 2006 You don't need to delete the tmp file after you upload the file. Also the tmp file is stored in the tmp dir. Quote Link to comment Share on other sites More sharing options...
ParK Posted September 11, 2006 Author Share Posted September 11, 2006 i want to delete it ... @ should be in there .... i cant delete any files ? thats my upload.php name > uploadedfile and changed delete.php to > [code]@unlink( '../il-uploads/'.$uploadedfile,'r');[/code]it doesnt delete ...[url=http://parksdiary.com/?page_id=11]upload somthng and try to delete it[/url]you cant delete the file which you have uploaded Quote Link to comment Share on other sites More sharing options...
ParK Posted September 11, 2006 Author Share Posted September 11, 2006 so how can i delete the uploaded by user i mean just user uploaded...or how can i write the line deleting the user uploaded file..."../il-uploads/'.$file_will_be_deleted.'";what is the code $file_will_be_deleted equals user uploaded file ?how can i delte a file which is just uploaded by user ?thanx :) Quote Link to comment Share on other sites More sharing options...
Jenk Posted September 11, 2006 Share Posted September 11, 2006 remove the @. It is hiding the one thing that will be most useful to you right now.. so remove it. Quote Link to comment Share on other sites More sharing options...
JayBachatero Posted September 11, 2006 Share Posted September 11, 2006 Ok you going to have to explain a lil better exactly what you are trying to do. From the look of it I see that you are uploading a file and deleting it right after you upload it. Not sure what is the whole point in doing this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.