hi What function should i use to display the source of a webpage?
Thanks
Happy New Year!
Im not positive on this, but it should work. <pre> <? $file = "/yourfile"; $fp = fopen ("$file", "r"); $fp = fpassthru($fp); echo $fp; ?> </pre>
Ouch, passthru is like exec and system, they run commands an print the output.
instead, on un*x:
<pre> <? passthru('cat filename'); ?> </pre>
I'm not sure what to use on windows. anybody?
I used fpassthru, which is totally different from passthru. But anyway, I was just told that you can use readfile();. One line solution.