Hey,
What are you really trying to do? Are you trying to display different information on a page based on query string provided in url? If yes you could simply do this:
- when calling page: test.php?id=1
<html>
<body>
<? if($_GET['id']==1){ ?>
here comes the content for id #1
<? }else if($_GET['id']==2){ ?>
here comes the content for id #2
<? }else if(!is_numeric($_GET['id']) || $_GET['id']<1){ ?>
invalid id (or page not found)
<? } ?>
</body>
</html>
if you are trying to load the content from the text file you could simply substitute the php code with:
<?
$contents = file_get_contents('./text_file_'.$_GET['id'].'.txt', true);
if($contents) print $contents;
else print 'Page not found';
?>
which would load contents of text file located in the same directory named: text_file_1.php for id=1 etc...
Good Luck