surreal5335
12-05-2010, 09:36 AM
I am having trouble getting my preg_match() to work properly.
Here is the code I have:
define('EBOOK_ROOT', '//millionaire/ebooks.php/');
define('DS', '/');
$url = $_SERVER['REQUEST_URI'];
if(preg_match(EBOOK_ROOT, $url))
{
$url = str_replace(EBOOK_ROOT.DS,'',$url);
}
I have been trying to find a good documentation on use of regular expressions in PHP, but havnt really found any
Thanks a lot for the help
Here is the code I have:
define('EBOOK_ROOT', '//millionaire/ebooks.php/');
define('DS', '/');
$url = $_SERVER['REQUEST_URI'];
if(preg_match(EBOOK_ROOT, $url))
{
$url = str_replace(EBOOK_ROOT.DS,'',$url);
}
I have been trying to find a good documentation on use of regular expressions in PHP, but havnt really found any
Thanks a lot for the help