Created
May 30, 2011 20:11
-
-
Save benklocek/999402 to your computer and use it in GitHub Desktop.
Regex for fixing absolute URL includes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pattern = '<\?(\s?include\("?)(http:\/\/www\.domain\.com)(.*?\.php)(.*\n?)'; | |
$subject = "<?php include($_SERVER['DOCUMENT_ROOT'] . '$3';) ?>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment