Hello, I'm hoping this is the right forum for this question.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
akimm
Forum Contributor
Posts: 460
Joined: Thu Apr 27, 2006 10:50 am
Location: Ypsilanti Michigan, formally Clipsburgh

Hello, I'm hoping this is the right forum for this question.

Post by akimm »

Weirdan | Please use

Code: Select all

, [syntax="language"]and

Code: Select all

tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


The only reason I used a .php extension on my index was so I could use a program I wrote that dynamically loads quotes into a page of mine, and a page couter. problem is I recently ftp'ed the site onto my desktop for modifications, and tried to reload it only to get this error,

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /nfs/cust/8/25/05/650528/web/index.php on line 4

I tried putting echo in front of all my nessesary html, but even then it would just produce another error. Then I even deleted all my meta content, at which point it starting saying <title></title> had an error in it. After wards my style sheet was even called error prone. This is the first time this ever happened to me, I'm not sure what to do. Here is the begining of my source code, hopefully, someone can help.
[syntax="html"]
<html>
<head>

<META HTTP-EQUIV='Content-type' CONTENT='text/html' charset=ISO-8859 -1">
<TITLE>A key into my mind</TITLE>
<LINK REV="made" href="mailto:dailylifez@yahoo.com">
<META NAME="keywords" CONTENT="Blog,wrestling,poetry,philosophy">
<META NAME="description' CONTENT="A site for the altered mentality of our 

future, read it if you're into wrestling, politics, philosophy, poetry, or 

free thinking. Read it if you're against any as well, it's always fun to 

find opposition in ways of mind.">
<META NAME="Sean Clair" CONTENT="A different way of thinking"><META NAME="ROBOTS" CONTENT="ALL">

<title> A key into my mind!</title>
Thanks for any help you can give


Weirdan | Please use[/syntax]

Code: Select all

, [syntax="language"]and

Code: Select all

tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
dasantillo
Forum Newbie
Posts: 10
Joined: Wed Mar 15, 2006 4:31 am
Location: Swansea, Wales

Post by dasantillo »

Your quotes don't match on this line:

Code: Select all

<META HTTP-EQUIV='Content-type' CONTENT='text/html' charset=ISO-8859 -1">
It should be like this:

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
That should solve it!

KR

Dan
User avatar
akimm
Forum Contributor
Posts: 460
Joined: Thu Apr 27, 2006 10:50 am
Location: Ypsilanti Michigan, formally Clipsburgh

Ah..

Post by akimm »

Thanks so much.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Parse errors are PHPs way of telling you that your PHP code has problems. Even if you named an HTML file something.php, if there was no PHP code in it, it is my understanding that you should not get errors because no PHP is going through the engine.

Post the code in your script that uses PHP (the line referenced in the error is the PHP line, not the entire file line) and let's have a look at it.

On a side note, please use the appropriate code tags when posting code ([ php ] [ code ] [ syntax="" ]).
Post Reply