Re: PHP code will not work
| From: | Daniel Brown | Date: | Thu, 12 Jun 2008 23:22:44 +0000 |
| Subject: | Re: PHP code will not work | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275297@lists.php.net to get a copy of this message | ||
On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida <jcspam0017@gmail.com> wrote:
> Hi.
>
> I am new to PHP. I found a tutorial that said to copy and paste the code
> into a .php document and open it in my browser:
>
> <?php
> echo $_SERVER['HTTP_USER_AGENT'];
> ?>
>
> I'm pretty sure PHP is enabled on my computer. I've tested code such as:
PHP is definitely on your system.
[snip!]
> The error I get when I try
>
>
> <?php
> echo $_SERVER['HTTP_USER_AGENT'];
> ?>
>
> is
>
> Parse error: syntax error, unexpected T_VARIABLE in
> /Library/WebServer/Documents/test.php on line 106
What is the code on lines 105 and 106 of test.php? If there's
nothing on line 105, please send us the immediately-preceding code.
By the way, a T_VARIABLE is just a variable --- anything beginning
with a $dollar_sign.
--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.