manusoftar

getHtml.php

Sep 3rd, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?
  2.   $file = $_GET['file'];
  3.   //echo "Intentando abrir -> " . $file;
  4.   if (file_exists($file)){
  5.       echo "El archivo existe!";
  6.   }
  7.   if (isset($file)){
  8.       $f = fopen($file,"r"); //or die("Error al abrir el archivo");
  9.       $buffer = "";
  10.       if ($f!=false){
  11.           while(!feof($f)){
  12.               $buffer .= fgets($f,4096) .'\n';
  13.           }
  14.       }
  15.       fclose($f);
  16.       echo $buffer;
  17.   }
  18.   ?>
Advertisement
Add Comment
Please, Sign In to add comment