From 57cd31bfd74d4f39ac3f8ea17671e382c2191b25 Mon Sep 17 00:00:00 2001 From: James Richards Date: Mon, 31 Mar 2003 20:36:15 +0000 Subject: [PATCH] Modified to use the $_FILES super global instead of needing register_globals to be on. Changed copy() to move_uploaded_file(). git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@175 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/importsurvey.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/importsurvey.php b/admin/importsurvey.php index 69fef6e491a..ce824ad1aa4 100644 --- a/admin/importsurvey.php +++ b/admin/importsurvey.php @@ -35,10 +35,9 @@ */ // A FILE TO IMPORT A DUMPED SURVEY FILE, AND CREATE A NEW SURVEY -$the_path = "$homedir"; -$the_full_file_path = $homedir . "/" . $the_file_name; +$the_full_file_path = $homedir . "/" . $_FILES['the_file']['name']; -if (!@copy($the_file, $the_path . "/" . $the_file_name)) +if (!@move_uploaded_file($_FILES['the_file']['tmp_name'], $the_full_file_path)) { echo "
Something went horribly wrong. See system administrator.
\n"; echo "\n\n";