Advertisement
MrViSiOn

Untitled

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