English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

My .php file contains:

$f=fopen("welcome.txt","r") or exit("Unable to open file!");
while (!feof($f))
{
$x=fgetc($f);
If $x="<"
{
echo"oooooooooooooooooo";
}
echo $x;
}
fclose($f);
?>



and My welcome.txt file contains:

hello world
its title

When I run the php file in wamp, nothing happens, but If I remove the below part, it works!
If $x="<"
{
echo"oooooooooooooooooo";
}


But I dont want to remove this part, How can I fix it? Do you have the same problem?

Thank you

2006-08-12 10:26:01 · 3 answers · asked by QuestionAnswer 2 in Computers & Internet Programming & Design

3 answers

Your comparison statement is wrong.
The correct statement is:
If ($x=="<")

2006-08-12 10:56:09 · answer #1 · answered by injanier 7 · 0 0

you would possibly want to extremely put in the URL, username, and password on your MySQL database. The strings 'SQL_SERVER', 'SQL_USER' and 'SQL_PASS' are placeholders from some variety of social gathering code.

2016-11-30 00:05:42 · answer #2 · answered by Anonymous · 0 0

you have a wrong syntax in if condition and should be written like this:
if ($x < some value) {
echo "OOOOOOOOO";
}

2006-08-12 10:49:39 · answer #3 · answered by Mag 7 · 0 0

fedest.com, questions and answers