CuteNews error

Status
Niet open voor verdere reacties.

TomasH

Gebruiker
Lid geworden
23 mei 2008
Berichten
42
Hallo,

Ik heb even wat codes weggehaald bij de cutenewspagina example2.php, maar ik denk dat het een regeltje te veel is geworden....
Hij geeft deze error: Parse error: syntax error, unexpected T_ECHO in /www/110mb.com/w/i/n/x/c/l/u/b/winxclub-tomas/htdocs/cutenews/example2.php on line 85.

De code die ik over heb is dit:
<?PHP

?>
<html>
<head>
<title>Example</title>
<style>
<!--
A { color: #003366; text-decoration: none; }
A:link { color: #003366; text-decoration: none; }
A:visited { color: #003366; text-decoration: none; }
A:active { color: #54622D; }
A:hover { color: #54622D; }


BODY,TD,TR{
font-family: verdana, arial, sans-serif;
color:#000;
font-size:11;
font-weight:normal;
}
.banner {
font-family: georgia, verdana, arial, sans-serif;
color:white;
font-size:x-large;
font-weight:bold;
border-left:1px solid #FFF;
border-right:1px solid #FFF;
border-top:1px solid #FFF;
background:#003366;
padding:7px;
}
.description{
font-family:verdana, arial, sans-serif;
font-size:x-small;
font-weight:bold;
}

//-->
</style>
</head>
<body bgcolor="#ffffff">
<div align="center"><center>
<table border="0" width="700" cellspacing="0" cellpadding="0">


<p align="center"><br><br>
<br>
<br>
<br>
</center>
</td>
<td width="520" valign="top" align="center">

<table border="0" width="453" cellspacing="1" cellpadding="3">
<tr>
<td width="441">
<?PHP

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here we decide what page to include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("./search.php"); }
elseif($_GET['do'] == "archives"){ include("./show_archives.php"); }
elseif($_GET['do'] == "stats"){ echo"You can download the stats addon and include it here to show how many news, comments ... you have"; /* include("$path/stats.php"); */ }
else{ include("./show_news.php"); }

?>
</td>
</tr>
</table>

</td>
</tr>
</table>
</td>
</tr>

</table><br><br><center>
<table border=0 width=700 style="border-top: 1px dotted #000000;">
<tr><td>
<p align="center">
</td></tr></table>
</body>
</html>

Wat doe ik fout?

Mvg,

TomasH
 
heb geen zin om lijntjes te tellen, wat is regel 85?...

anywho check deze eens:
PHP:
echo"You can download the stats addon and include it here to show how many news, comments ... you have"; /*
de 'echo' staat direct vast aan een open-quote, denk dat dat het is.
 
Ik heb er geen verstand van verder, zou je kunnen zeggen wat ik daar moet wijzigen?
 
in plaats van:
PHP:
echo"foobarfoobar (...)
zet je tussen de 'echo' en de ' " ' een spatie:
PHP:
echo "foobarfoobar (...)


[edit]
ik heb hieronder even je stukje php *iets* netter ge-re-write:
PHP:
<?PHP

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here we decide what page to include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){

   $subaction = "search"; $dosearch = "yes"; include("./search.php");

}elseif($_GET['do'] == "archives"){

   include("./show_archives.php");

}elseif($_GET['do'] == "stats"){

    echo "You can download the stats addon and include it here to show how many news, comments ... you have";
    // include("$path/stats.php");

}else{

    include("./show_news.php");

}

?>
[/edit]
 
Laatst bewerkt:
in plaats van:
PHP:
echo"foobarfoobar (...)
zet je tussen de 'echo' en de ' " ' een spatie:
PHP:
echo "foobarfoobar (...)


[edit]
ik heb hieronder even je stukje php *iets* netter ge-re-write:
PHP:
<?PHP

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here we decide what page to include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){

   $subaction = "search"; $dosearch = "yes"; include("./search.php");

}elseif($_GET['do'] == "archives"){

   include("./show_archives.php");

}elseif($_GET['do'] == "stats"){

    echo "You can download the stats addon and include it here to show how many news, comments ... you have";
    // include("$path/stats.php");

}else{

    include("./show_news.php");

}

?>
[/edit]

Inmiddels heb ik deze code dus:
<?PHP

?>
<html>
<head>
<title>Example</title>
<style>
<!--
A { color: #003366; text-decoration: none; }
A:link { color: #003366; text-decoration: none; }
A:visited { color: #003366; text-decoration: none; }
A:active { color: #54622D; }
A:hover { color: #54622D; }


BODY,TD,TR{
font-family: verdana, arial, sans-serif;
color:#000;
font-size:11;
font-weight:normal;
}
.banner {
font-family: georgia, verdana, arial, sans-serif;
color:white;
font-size:x-large;
font-weight:bold;
border-left:1px solid #FFF;
border-right:1px solid #FFF;
border-top:1px solid #FFF;
background:#003366;
padding:7px;
}
.description{
font-family:verdana, arial, sans-serif;
font-size:x-small;
font-weight:bold;
}

//-->
</style>
</head>
<body bgcolor="#ffffff">
<div align="center"><center>
<table border="0" width="700" cellspacing="0" cellpadding="0">


<p align="center"><br><br>
<br>
<br>
<br>
</center>
</td>
<td width="520" valign="top" align="center">

<table border="0" width="453" cellspacing="1" cellpadding="3">
<tr>
<td width="441">
<?PHP

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here we decide what page to include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){

$subaction = "search"; $dosearch = "yes"; include("./search.php");

}elseif($_GET['do'] == "archives"){

include("./show_archives.php");

}elseif($_GET['do'] == "stats"){

echo "You can download the stats addon and include it here to show how many news, comments ... you have";
// include("$path/stats.php");

}else{

include("./show_news.php");

}

?>
</td>
</tr>
</table>

</td>
</tr>
</table>
</td>
</tr>

</table><br><br><center>
<table border=0 width=700 style="border-top: 1px dotted #000000;">
<tr><td>
<p align="center">
</td></tr></table>
</body>
</html>
Maar nog steeds: Parse error: syntax error, unexpected T_ECHO in /www/110mb.com/w/i/n/x/c/l/u/b/winxclub-tomas/htdocs/cutenews/example2.php on line 85
Is er nog iets fout?
 
O_o

erhm, het enige wat ik kan bedenken is dat de <?PHP moet veranderen in <?php
beetje vreemd :p als ik tel, kom ik uit op dat regel 85 de 1e </td> na de php-code is....

:confused:
 
Inmiddels is het opgelost, ik weet niet hoe, ik dat er wat mee te *en en toen deed hij het weer.

Toch bedankt allemaal voor jullie reacties! :thumb:
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan