Reply to Re: php error

Your name:

Reply:


Posted by noone on 02/11/06 20:52

newbie wrote:
> hi can anyone tell me why i am receiving error msg with this php script
>
>
> <?php
> require($_SERVER["DOCUMENT_ROOT"]."/config/db_config.php");
>
> $connection = mysql_connect($db_host,$db_user,$db_passwword) or
> die
> ("no connection");
> echo "connection established";
>
> ?>
>
>
> // this is the error message i am receiving.
>
> Parse error: syntax error, unexpected T_VARIABLE in
> C:\webroot\config\db_config.php on line 2
>
> // I am using apache webserver 2.0 and php version 4.0 thankyou very
> much
> for your help.
> // i am trying to access mysql database.
>
> anyhelp will be appreciated
>
> Marcus
>

To what does $_SERVER["DOCUMENT_ROOT"] translate? (should really be
$_SERVER['DOCUMENT_ROOT']

before the above require statement add the following to see...
echo $_SERVER['DOCUMENT_ROOT']."/config/db_config.php\n";
echo $_SERVER["DOCUMENT_ROOT"]."/config/db_config.php\n";
flush();

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация