Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $toreplace = "/var/www/"; // the old path to root
- $replace = "C:/wamp/www/data"; // the new path to root
- foreach(glob("*.php") as $php_file) {
- $data = file_get_contents($php_file);
- $data = str_replace($toreplace,$replace,$data);
- file_put_contents($php_file,$data);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement