having a problem with a delimiter. I'm a noob with PHP, so I'm sorry if this is a really simple fix. I was using eregi() before, but I checked on here for a "deprecated" error, and I found out that I had to use preg_match. Anyways, here's the error:
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/legitstr/public_html/members/includes/functions.php on line 4
And here's my code: (I've checked on other threads before, but no one seems to have similar code to mine)
$file = basename(__FILE__);
if(preg_match($file,$_SERVER['REQUEST_URI'])) {
die("Sorry but you cannot access this file directly for security reasons.");
Please help me out, and thank you!