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 ? Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/ 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 Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89507 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 Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89544 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. Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89564 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 Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89634 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 :) Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89711 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. Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89728 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. Link to comment https://forums.phpfreaks.com/topic/20321-unlink-from-server-problem/#findComment-89979 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.