i tried this code from the princess ... my problem:
the if case never occurs 🙁
it is allway the else part ...
i made a version2 directory and put several textfiles in it
and then tried several methods to "call" them via the url/link
i have this problem in another code sample to .. seems to me
the "if($something) is not interpreted correctly ....
uhm .. i'm a newb .. is it possible that i installed php wrong?
could you show me how to "call" it correctly please
its ie6.0, ms$iis, mysql, php, myphp
<?PHP
// Sample script written by Daynah
// PHP-Princess.net
// Where all your text files are located at
$directory = './version2/';
// If the variable exists
// Example: If the url is index.php?page=aboutme
if($page)
{
// Does the file $directory/$page.txt exist?
if(is_file("$directory$page.txt"))
include("$directory$page.txt");
else
print "Sorry, this page does not exist";
}
// If the page is just called as index.php
// Then just include the default main.txt page
else
{
$mypage = 'main.txt';
echo "$page";
include("$directory$mypage");
}
?>