Hi...

I need to open a html file.

I've a variable "$fileout" in PHP which created a new file named "file.html". Now, i want it to open file.html from the browser. How can i do it?

I can open my text file in a browser by using file_get_contents function, but if i use this function to open my html file , then my hyperlink won't show as hyperlink. It shows as normal text.

Any idea?

Thanks.

    if $fileout
    is path to file like : "/htdocs/folder/file.html"
    or relative "./folder/file.html"

    you could simply make an include in your php-page

    include ( $fileout );
    // this will of course also work
    include ( "./folder/file.html" );

      if the script that created the file hasnt output anything to the browser, you can do
      header("Location: file.html");
      to send the users browser to the actual page created...

        Write a Reply...