Howdy guys...
im not an expert when it comes to php.. you could say im a newbie =3D)
but this is what im trying to do...
i have a php file called index.php
the url someone may visit could be index.php?res=3D12801024
now what i want to do is grab the information in res
and with that open a certain file and display the file to the browser..
here is what i have atm...
<?php
$wfn =3D "main.$res.txt";
$wbs =3D @fopen ($wfn, "r");
if (!$wbs) { echo ("Unable to locate file requested. [Error Line: =
4]<br>\n"); return; }
$wct =3D fread ($wbs, filesize ($wfn));
echo ($wct + "\n");
fclose ($wbs);
?>
all it seems to be outputting is '0' (if i tweak the .txt it sometimes =
outputs '1')
example of the main.12801024.txt is:
<html>
<head>
<title>test</title>
</head>
<body></body>
BLAH!
</html>
if anyone out there can help me thanks heaps.
-----------------------------------------
Derek "Anti-Gremlin" Spranger
Managing Director, Hexidecimal =A9 2000, 2001
http://www.hexidecimal.com.au/
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug