| | |
"syntax error, unexpected T_STRING"...?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2007
Posts: 2
Reputation:
Solved Threads: 0
I'm trying to code a Wordpress theme, and I'm getting this error message -
"Parse error: syntax error, unexpected T_STRING in /home/xxxxxx/public_html/wp-content/themes/xxxxxxx/index.php on line 27"
The thing is, I can't figure out what's wrong :/ Here's the code -
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head profile="http://gmpg.org/xfn/11">
5
6
7 <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
8
9 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; 10charset=<?php bloginfo('charset'); ?>" />
11 <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> 12<!-- leave this for stats please -->
13
14 <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" 15type="text/css" media="screen" />
16 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?17php bloginfo('rss2_url'); ?>" />
18 <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo19('rss_url'); ?>" />
20 <link rel="alternate" type="application/atom+xml" title="Atom 0.3" 21href="<?php bloginfo('atom_url'); ?>" />
22 <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
23
24 <?php wp_get_archives('type=monthly&format=link'); ?>
25 <?php //comments_popup_script(); // off by default ?>
26 <?php wp_head(); ?>
27</head>
<body>
<div id="header">
<h1>
<a href="<?php bloginfo('url');?>"><?php bloginfo('name');?></a>
</h1>
<?php bloginfo(’description’);?>
</div>
Line 27 seems to be "</head>", but I can't see anything wrong with that... O_o Any suggestions?
"Parse error: syntax error, unexpected T_STRING in /home/xxxxxx/public_html/wp-content/themes/xxxxxxx/index.php on line 27"
The thing is, I can't figure out what's wrong :/ Here's the code -
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head profile="http://gmpg.org/xfn/11">
5
6
7 <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
8
9 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; 10charset=<?php bloginfo('charset'); ?>" />
11 <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> 12<!-- leave this for stats please -->
13
14 <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" 15type="text/css" media="screen" />
16 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?17php bloginfo('rss2_url'); ?>" />
18 <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo19('rss_url'); ?>" />
20 <link rel="alternate" type="application/atom+xml" title="Atom 0.3" 21href="<?php bloginfo('atom_url'); ?>" />
22 <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
23
24 <?php wp_get_archives('type=monthly&format=link'); ?>
25 <?php //comments_popup_script(); // off by default ?>
26 <?php wp_head(); ?>
27</head>
<body>
<div id="header">
<h1>
<a href="<?php bloginfo('url');?>"><?php bloginfo('name');?></a>
</h1>
<?php bloginfo(’description’);?>
</div>
Line 27 seems to be "</head>", but I can't see anything wrong with that... O_o Any suggestions?
Last edited by rabichan; Oct 23rd, 2007 at 5:09 pm.
I think it is on this one:
try to put echo on those you want to display inside the PHP tags.
php Syntax (Toggle Plain Text)
<a href="<?php bloginfo('url');?>"><?php bloginfo('name');?></a> </h1> <?php bloginfo(’description’);?>
try to put echo on those you want to display inside the PHP tags.
![]() |
Similar Threads
- Parse error: syntax error, unexpected T_STRING (PHP)
- syntax error, unexpected $end in ndex.php on line 127 (PHP)
- Parse error: syntax error, unexpected T_STRING in c:/.......... (PHP)
- Please Help! parse error, unexpected T_STRING (PHP)
- Parse error: parse error, unexpected T_STRING (PHP)
- PHP Parse error: parse error, unexpected T_STRING (PHP)
- Parse error: parse error, unexpected T_STRING in /home/thei2k9/public_html/includes/f (PHP)
Other Threads in the PHP Forum
- Previous Thread: Senior Web Developer Position
- Next Thread: PHP and adding Forum
| Thread Tools | Search this Thread |
.htaccess ajax apache api array beginner binary broken buttons cakephp checkbox class cms code cron curl database date directory display dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail mediawiki menu mlm mod_rewrite multiple mysql number oop paypal pdf php phpincludeissue phpmyadmin problem query radio random recursion regex remote script search server sessions sms soap source sp space speed sql subdomain syntax system table tag tutorial update upload url validation validator variable vbulletin video web webdesign websphere white xml youtube





