Question:
PHP Question:?
Scott P
2008-04-09 15:27:37 UTC
Parse error: parse error, unexpected T_ECHO in /home/content/p/f/e/pfeiffee/html/PAGES/java.php on line 4

I can't find the error here, and what does unexpected T_ECHO even mean?
$section = $_GET['section'];

echo '';
[[ there is more code beyond here but commenting it out yields the same error ]]
Three answers:
anonymous
2008-04-09 15:35:21 UTC
I have encounted confusing errors like this before that seem to not have a soloution. Try changing the ' s to " s on the echo.
daa
2008-04-09 22:45:41 UTC
This message basically means that something is wrong somewhere BEFORE the echo statement on line 4, so look for syntax errors on lines 1-3.



I see two possibilities -



1. If your server isn't configured to allow short open tags, you will need to use


2. You're not checking to see if $_GET['section'] is set. Try this -

if (isset($_GET['section'])) {

$section = $_GET['section'];

}
Tasm
2008-04-09 22:33:49 UTC
Does php work on your server?



Also

$dir_handle = @opendir('./') or die("Error ID 1: Folder does not exist.");





Try two backslashes



$dir_handle = @opendir('.\\') or die("Error ID 1: Folder does not exist.");


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...