Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $import = file_get_contents("dateixyz.sql");
- $import = preg_replace ("%/\*(.*)\*/%Us", '', $import);
- $import = preg_replace ("%^--(.*)\n%mU", '', $import);
- $import = preg_replace ("%^$\n%mU", '', $import);
- mysql_real_escape_string($import);
- $import = explode (";", $import);
- foreach ($import as $imp){
- if ($imp != '' && $imp != ' '){
- mysql_query($imp);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement