Jump to content

Archived

This topic is now archived and is closed to further replies.

ParK

unlink from server problem ?

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
You don't need to delete the tmp file after you upload the file.  Also the tmp file is stored in the tmp dir.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
remove the @. It is hiding the one thing that will be most useful to you right now.. so remove it.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.