View Full Version : Parse error
zoobie
June 6th, 2002, 01:21
if ($html != ""){
huh:confused:
hohoho
June 6th, 2002, 01:25
you should use if(!empty($html)) {
or if(!isset($html))
but use this only if you didn't create $html till now
this should work
zoobie
June 6th, 2002, 02:00
Nothing works...
What's really funny is that I've discovered that a lot of scripts available at hotscripts don't even run and are filled with errors. I guess they don't care or they haven't been reported. ROTFLMAO
hohoho
June 6th, 2002, 02:32
hmm...i downloaded many scripts there and all worked...
hohoho
June 6th, 2002, 02:48
could you please post the code lines before and after this part ?
it could be a missing ;
which script is it ? ;)
i want to test it on my server, maybe then i see the mistake
now i tried the following script to test if something is wrong on the if funtion...it worked
$html = "testing this script"; line 1
if($html != ""){ line 3
echo "it works !"; line 4
} line 5
and if you delete the ; in the first line, then you get a parse error on line 3
Parse error: parse error, unexpected T_IF on line 3
YUPAPA
June 6th, 2002, 11:35
Are you talking about PHP?
PERL:
if($html eq "") {
# Some stuff here
}
ashben
June 6th, 2002, 12:40
Originally posted by YUPAPA
Are you talking about PHP?
PERL:
if($html eq "") {
# Some stuff here
}
One correction to the perl equivalent:
if($html neq "") {
Dusty
June 6th, 2002, 12:48
You mean ne, not neq. Or you could do !$html eq "".
And that's a PHP error, a Perl one would be more descriptive than that. You're either missing a semicolon on the previous line or a closing quote.
ashben
June 6th, 2002, 14:59
Originally posted by Dusty
You mean ne, not neq.
That's right :o
YUPAPA
June 6th, 2002, 15:25
Oh sorry I misread the code... should be
if($html ne "") {
#something here
}
OR
if(!$html eq "") {
#something here
}
zoobie
June 6th, 2002, 22:18
Umm...It's php :rolleyes:
The script is here (http://www.hotscripts.com/cgi-bin/dload.cgi?ID=13357).
As it is, it couldn't possibly run. He forgot to comment out some things, too.
Thanks :confused2
Dusty
June 7th, 2002, 10:35
That script works fine, I get no error.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.