[ PHPXref.com ] [ Generated: Sun Jul 20 20:55:40 2008 ] [ vtiger CRM 4.2.3 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> fileupload.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  
  12  mkdir("./cache/mails", 0700);
  13  $uploadDir = './cache/mails/';
  14  $uploadFile = $uploadDir . $_FILES['userfile']['name'];
  15  
  16  print $uploadFile;
  17  print $_FILES['userfile']['tmp_name'];
  18  print '<br>----------------------------------------';
  19  
  20  print '<br>userfile,name array : ' ;
  21  print $_FILES['userfile']['name'];
  22  print '<br>userfile array : ' ;
  23  print $_FILES['userfile'];
  24  print '<br>name array : ' ;
  25  print $_FILES['name'];
  26  
  27  print $_FILES['userfile1']['name'];
  28  
  29  print $_REQUEST['userfile1'];
  30  //print $_REQUEST['userfile'];
  31  
  32  
  33  
  34  print "<pre>";
  35  if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
  36  
  37  {
  38      print "File is valid, and was successfully uploaded. ";
  39      print "Here's some more debugging info:\n";
  40      print_r($_FILES);
  41  }
  42  else
  43  {
  44      print "Possible file upload attack!  Here's some debugging info:\n";
  45      print_r($_FILES);
  46  }
  47  print "</pre>";
  48  ?>
  49  


[ Powered by PHPXref - Served by Debian GNU/Linux ]