Advertisement
MrViSiOn

Untitled

Jun 19th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. if($_POST){
  5.     $txt = array();
  6.     $i = 0;
  7.     foreach ($_POST as $key => $value) {
  8.         // $txt[] = print_r($value, true);
  9.         $h = dirname (__DIR__).'/glop/productos/'.time ()."-".$i++.'.xml';
  10.         file_put_contents($h, $value);
  11.         break;
  12.     }
  13.     // file_put_contents($h, implode("", $txt));
  14. }
  15.  
  16. if($_GET){
  17.     $h = dirname (__DIR__).'/glop/productos/'.time ().'2.txt';
  18.     // file_put_contents($h, print_r($_GET, true));
  19.     $txt = array();
  20.     foreach ($_GET as $key => $value) {
  21.         $txt[] = "$key:: "."\n".print_r($value, true);
  22.     }
  23.     file_put_contents($h, implode("\n----\n", $txt));
  24. }
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement