Jump to content

File uploads...


aximbigfan

Recommended Posts

Hi,

 

I'm making a system where a user can upload a config file for a PHP app I made. I am runngi nint oa lot of problems.

 

here is what I have thus far:

unlink('config.php');
move_uploaded_file($_FILES['upload']);
if ($_FILES['upload']['name']!=config.php)
rename("$_FILES['upload']['name']","config.php");
echo "ok";

 

What should I do to this to make it work?

 

Thanks very much,

Chris

Link to comment
https://forums.phpfreaks.com/topic/89508-file-uploads/
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.