Tuesday, January 8, 2019

Post values file handling

 // POST VALUES
  date_default_timezone_set('Asia/Kolkata');
  $path = 'debug_log/debug_log.txt';
  file_put_contents($path, print_r('<<<<< POST VALUES_'.date('Y-m-d H:i:s'),true).' >>>>>', FILE_APPEND);
  $this->content = str_repeat(PHP_EOL, 1);
  $this->content .= print_r($_POST,true);
  $this->content .= str_repeat(PHP_EOL, 1);
  $this->content .= '============================================' . PHP_EOL . PHP_EOL; 
  file_put_contents($path, $this->content, FILE_APPEND); 
 // FILES VALUES
  file_put_contents($path, print_r('<<<<< IMAGES_'.date('Y-m-d H:i:s'),true).' >>>>>', FILE_APPEND);
  $this->content_file = str_repeat(PHP_EOL, 1);
  $this->content_file .= print_r($_FILES,true);
  $this->content_file .= str_repeat(PHP_EOL, 1);
  $this->content_file .= '============================================' . PHP_EOL . PHP_EOL;
  file_put_contents($path, print_r($this->content_file,true), FILE_APPEND);

  echo '<pre>'; print_r($_POST);
  echo '<pre>'; print_r($_FILES);
  exit;

No comments:

Post a Comment