Skip to content

Commit

Permalink
Modified to use the $_FILES super global instead of needing register_…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
James Richards committed Mar 31, 2003
1 parent 13a1709 commit 57cd31b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions admin/importsurvey.php
Expand Up @@ -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 "<b><center>Something went horribly wrong. See system administrator.</center></b>\n";
echo "</body>\n</html>\n";
Expand Down

0 comments on commit 57cd31b

Please sign in to comment.