Wrox Programmer Forums
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2004, 12:09 PM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parse error

Hi.
I'm on the first pages of "beginning PHP..." and in chapter 1 page 17 I shall make a test of PHP :
<HTML>
<HEAD>
<TITLE>PHP Testing</TITLE>
</HEAD>
<BODY>
<?php
echo “If this works, we <i>really</i> did it!”;
?>
</BODY>
</HTML>

But when I go to http://localhost/phptest.php it gives me this error message:

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Programmer\Apache Group\Apache2\test\phptest.php on line 7

Can someone tell me what i've done wrong?

Kurt

 
Old July 27th, 2004, 12:36 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Looks alright to me. Are you using Internet Explorer? If so try clearing the IE cache.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old July 27th, 2004, 01:53 PM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I cleaned out the chache, but it still doesn't work.

maybe it works for you? :

http://195.47.179.144/phptest.php

Kurt


 
Old July 27th, 2004, 02:05 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Ah, it's your quotes.. the quotes must be plain old straight double or single quotes. The fancy ones you're using are different characters, and thus won't work.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::
 
Old July 27th, 2004, 02:28 PM
Registered User
 
Join Date: Jul 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks alot... works now :)


Kurt






Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error, unexpected T_ELSE in /h vipin k varghese BOOK: XSLT Programmer's Reference, 2nd Edition 4 September 29th, 2011 01:19 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
PHP Parse error: parse error, unexpected T_STRING geminient PHP How-To 4 August 18th, 2007 02:27 AM
Parse error: parse error, unexpected $end Ayodeji Adegbaju Pro PHP 3 January 12th, 2007 12:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.