Jump to content

clearing user files?


MoMoMajor

Recommended Posts

You want to remove the file from dir, so unlink will work.

OR you want to clear page cache... why not show a msg after uploading by using header to redirect to successful upload page and then back to that page. just an idea.

 

i have unlink($_FILE['userfile']) but it doesn't work.

Link to comment
https://forums.phpfreaks.com/topic/167468-clearing-user-files/#findComment-883051
Share on other sites

Ok I have been trying for hours and hours to stop my image upload script from uploading the same image whenever a user refreshes the page.

 

I have tried unlink, unset and redirecting the user and back. It still won't quit. I have literally unset every single input element in my script but the form still submits the previous image when the page is refreshed.

 

unlink just returns the following error:

 

Warning: unlink() [function.unlink]: No error in c:\program files\....

 

I even tried to attach a user submitted validation to the script by making them solve a simple addition question but even this didn't work because for some reason unset didn't stop the variables from being removed.

Link to comment
https://forums.phpfreaks.com/topic/167468-clearing-user-files/#findComment-883102
Share on other sites

Archived

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

×
×
  • Create New...

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.