954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP Parse error: parse error, unexpected T_STRING in F:\downloads\cats-0.6.1\index.ph

if (!function_exists('mysql_connect('localhost', 'root', 'sushma')'))
{
    die(
        '<span class="fatalError">Fatal error: ' .
        'MySQL extension is not loaded. Check your settings in php.ini.</span>'
    );
}


line 67 is where the parse error is reported..where is
the error????cann anyone help me??

sush.gopal
Newbie Poster
1 post since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

Try:

if (!function_exists(mysql_connect('localhost', 'root', 'sushma')))
{
    die(
        '<span class="fatalError">Fatal error: ' .
        'MySQL extension is not loaded. Check your settings in php.ini.</span>'
    );
}
stymiee
He's No Good To Me Dead
Moderator
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
 

Look up the function_exists in php manual, it takes one parameter -- a function name, so:
[php]
if ( !function_exists('mysql_connect') )
{
die(
'Fatal error: ' .
'MySQL extension is not loaded. Check your settings in php.ini.'
);
}
[/php]

php_daemon
Junior Poster
140 posts since Aug 2006
Reputation Points: 13
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You