include path issue
Posted: Mon Jan 14, 2008 10:31 am
I'm attempting to connect to a MS SQL Server with:
<?
\\ ------------ mssql connection test file --------------------
$db_variables = substr($PATH_TRANSLATED,0,strrpos($PATH_TRANSLATED,"\"))."\includes\config.php";
include("$db_variables");
$db_handle = mssql_connect($server,$user,$password) or die("Couldn't connect to SQL Server on $server");
?>
My file, config.php, sits in a directory 'includes' which is on the same directory level as directory 'wwwroot' in C:\inetpub on an XP Pro box, and contains the login variables. Currently, I have the error: "Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Inetpub\wwwroot\dbtest.php on line 5".
Where am I going wrong please? I've already tried forward-slashes instead, but this did not help me.
<?
\\ ------------ mssql connection test file --------------------
$db_variables = substr($PATH_TRANSLATED,0,strrpos($PATH_TRANSLATED,"\"))."\includes\config.php";
include("$db_variables");
$db_handle = mssql_connect($server,$user,$password) or die("Couldn't connect to SQL Server on $server");
?>
My file, config.php, sits in a directory 'includes' which is on the same directory level as directory 'wwwroot' in C:\inetpub on an XP Pro box, and contains the login variables. Currently, I have the error: "Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\Inetpub\wwwroot\dbtest.php on line 5".
Where am I going wrong please? I've already tried forward-slashes instead, but this did not help me.