in reply to Printing contents of file on a HTML page.
Basically you haven't specified that the contents of the file is to be printer anywhere, only the name of the file - in this section of code
You're not specifying that the contents of file $myfile be printed, but rather the value of variable $myfile which you've set to "/perl/bin/bas.txt";<body> Okay this prints out.<br> $myfile </body> </html>
What you need is something that will print out the HTML header info - I'd suggest using the CGI module rather than hand coding, and then a loop to read through the file printing out the contents.
|
|---|