#29742 [Opn->Bgs]: Parse error when using a script for displaying contents by url querys
| From: | iliaa@php.net | Date: | Wed, 18 Aug 2004 21:07:37 +0000 |
| Subject: | #29742 [Opn->Bgs]: Parse error when using a script for displaying contents by url querys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64885@lists.php.net to get a copy of this message | ||
ID: 29742
Updated by: iliaa@php.net
Reported By: cheetah-z at web dot de
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: FreeBSD
PHP Version: 4.3.8
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You forgot to close the 1st if()
Previous Comments:
------------------------------------------------------------------------
[2004-08-18 19:59:03] cheetah-z at web dot de
Description:
------------
I wanted to build a website with an structure as easy as possible. So i
decided to use a php script displaying different contents on the same
site by using querys.
BTW: Sorry for my english, it may be a bit lame, but I am German so
just try to understand my special germenglish.
Reproduce code:
---------------
<?php
if ($site == "home") {
echo "<h2>Willkommen auf der Webseite von TM-Servers
<br>Diese Webseite wurde zum Zweck der Information...
...tm-server.de.vu ging heute online.";
if ($site == "server") {
echo "Serverdaten folgen in Kürze!";
}
if ($site == "members") {
echo "Mitgliederliste folgt in Kürze!";
}
if ($site == "links") {
echo "Hier werden demnächst sehenswerte Links
gesammelt!";
}
if ($site == "partner") {
echo "Demnächst werden hier alle Partner und Sponsoren
von TM-Serversaufgeführt!";
}
?>
Expected result:
----------------
I expected my website to open regularly and when clicking a link
containing a query
(for example: "index.php?site=members" to display the content defined
by the echo function (for example: "Mitgliederliste folgt in Kürze!")
Actual result:
--------------
Parse error: parse error, unexpected $ in
/home/export/www/vhosts/funnetwork/hosting/cheetah7/index.php on line
97
an important information is, that line 97 is the very end of index.php
and just contains: "</html>" The php tag was already closed many lines
before!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29742&edit=1