Code Comments
Programming Forum and web based access to our favorite programming groups.I'm trying to open a local HTML file. When I run this code: $filename = '/Library/WebServer/Documents/PT_Test_Site/Results.html'; fOpen($filename, "r"); ...I get a blank screen. How can I fix this? Thanks in advance for any info. -Vik
Post Follow-up to this messageVik Rubenfeld a écrit le 22/03/2004 : > I'm trying to open a local HTML file. When I run this code: > > $filename = '/Library/WebServer/Documents/PT_Test_Site/Results.html'; > fOpen($filename, "r"); > > ...I get a blank screen. How can I fix this? Thanks in advance for any > info. > > -Vik fopen() returns a file handle it does not render the page, so it is normal behaviour. See manual for more about this function : http://www.php.net/fopen Tell us what you want to do so we can help. If you want to redirect try this : <?php header("Location: $filename"); ?>
Post Follow-up to this messageThanks. That worked.
-Vik
> If you want to redirect try this :
>
> <?php header("Location: $filename"); ?>
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.