Quantcast
Channel: DigitalWorldz - Satellite, Cable TV, Streaming TV, Computer Technology Experts
Viewing all articles
Browse latest Browse all 29915

php error

$
0
0
hi guys, got a problem here with this code it was wrote for older php version i think, the new host has the newer php version, i am in no way a php person or any other code tbh

<?php

global $admin_file;
if (!eregi($admin_file.'.php', $_SERVER['PHP_SELF'])){
die('Access Denied');
}
adminmenu($admin_file.'.php?op=ts3', 'Teamspeak 3', 'teamspeak3.png');

?>

the error is this

Deprecated: Function eregi() is deprecated in /home/addicted/public_html/admin/links/links.ts3.php on line 4

ok so i changed the code to this

<?php

global $admin_file;
if (!preg_match($admin_file.'/.php/', $_SERVER['PHP_SELF'])){
die('Access Denied');
}
adminmenu($admin_file.'.php?op=ts3', 'Teamspeak 3', 'teamspeak3.png');

?>

now the error is this


Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/addicted/public_html/admin/links/links.ts3.php on line 4

could one of you whos good with php tell me where i am going wrong with the delimiter?

Thanx

FocuS

Viewing all articles
Browse latest Browse all 29915

Trending Articles