Location: PHPKode > projects > PHPExplorer > modules/upload.php
<?

###############################################
#             PHP-Explorer Plugin             #
###############################################
# Upload plugin : Make able to upload files   #
# on the remote server.                       #
###############################################

require_once("../include/varsfuncs.php");

if(!$fup||!$fup_name){
 header("Location: $path"."index.php?dir=$dir");
 exit();
}

if(!@file_exists($fup))
{
  die("<html><script>alert('Impossible d\\'uploader \"$fup_name\" !');window.location.href='$path"."index.php?dir=$dir';</Script></html>");
}

if(@is_uploaded_file($fup))
{
  @copy($fup,$anonymous.$dir.$fup_name);
}
else
{
  die("<html><script>alert('Impossible d\\'enregistrer \"$fup_name\" pour des raisons de sécurité !');window.location.href='$path"."index.php?dir=$dir';</Script></html>");
}

@unlink($fup);

die("<html><script>alert('Le fichier \"$fup_name\" a été uploadé !');window.location.href='$path"."index.php?dir=$dir';</Script></html>");

// <=== EOF ===> //

?>
Return current item: PHPExplorer