Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.30 KB | None | 0 0
  1. <?php
  2.   $toreplace = "/var/www/"; // the old path to root
  3.   $replace = "C:/wamp/www/data"; // the new path to root
  4.   foreach(glob("*.php") as $php_file) {
  5.     $data = file_get_contents($php_file);
  6.     $data = str_replace($toreplace,$replace,$data);
  7.     file_put_contents($php_file,$data);
  8.   }
  9. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement