Advertisement
Guest User

Untitled

a guest
May 24th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1.    $import = file_get_contents("dateixyz.sql");
  2.  
  3.    $import = preg_replace ("%/\*(.*)\*/%Us", '', $import);
  4.    $import = preg_replace ("%^--(.*)\n%mU", '', $import);
  5.    $import = preg_replace ("%^$\n%mU", '', $import);
  6.  
  7.    mysql_real_escape_string($import);
  8.    $import = explode (";", $import);
  9.  
  10.    foreach ($import as $imp){
  11.     if ($imp != '' && $imp != ' '){
  12.      mysql_query($imp);
  13.     }
  14.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement