> <html>
> <head>
> <title>test</title>
> </head>
> <body></body>
> BLAH!
> </html>

Maybe put the BLAH! between the <body> tags to start....


> <?php
>  $wfn = "main.$res.txt";
>  $wbs = @fopen ($wfn, "r");
>  if (!$wbs) { echo ("Unable to locate file requested. [Error Line:
4]<br>\n"); return; }
>  $wct = fread ($wbs, filesize ($wfn));
>  echo ($wct + "\n");
>  fclose ($wbs);
> ?>

I probably go about it a stupid way...but

<?php
        $ar = array("main.",$res,".txt");

       $content_page=implode("",$ar)

       $content = fopen($content_page,"r");

       fpassthru($content);

       fclose($content);
?>

should work....



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Derek "Anti-Gremlin" Spranger
Sent: Saturday, 14 April 2001 6:09 PM
To: '[EMAIL PROTECTED]'
Subject: [SLUG] php question


Howdy guys...

im not an expert when it comes to php.. you could say im a newbie =)

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=12801024
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...



all it seems to be outputting is '0' (if i tweak the .txt it sometimes
outputs '1')


example of the main.12801024.txt is:



if anyone out there can help me thanks heaps.

-----------------------------------------

Derek "Anti-Gremlin" Spranger
Managing Director, Hexidecimal © 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


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to