I just picked up PHP again, after not having scripted for about a year. So I downloaded XAMPP to set up a testing environment. My PHP scripts seem to work properly, except for the fact that the includes won't work. I've read several topics about this problem, but my problem is entirely different. As soon as I include a PHP file, the rest of my script is converted in some sort of strange Chinese symbols.
Code fragment for include:
- Code: Select all
...include ("pass.php");
$c = checkPass("ai","caramba");...
Pass.php:
- Code: Select all
<?php
function checkPass($username, $password){
if($username == "foo" && $password == "bar"){
return true;
}
}
?>
Outcome:
戼㸯㰊㹢慆慴牥潲㱲戯㨾†慃汬琠湵敤楦敮畦据楴湯愠摤⤨椠戼䌾尺牂浡塜䵁偐硜浡灰桜摴捯屳慂捬湯㉹楜摮硥瀮灨⼼㹢漠楬敮㰠㹢㜲⼼㹢戼㸯
Page source:
<?php
function checkPass($username, $password){
if($username == "bram" && $password == "boe"){
return true;
}
}
?>戼㸯㰊㹢慆慴牥潲㱲戯㨾†慃汬琠湵敤楦敮畦据楴湯愠摤⤨椠戼䌾尺牂浡塜䵁偐硜浡灰桜摴捯屳慂捬湯㉹楜摮硥瀮灨⼼㹢漠楬敮㰠㹢㜲⼼㹢戼㸯
Any idea what might cause this problem?
Thanks in advance!
-aMess