Re: The "noobest" of questions...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Brett,
[please keep conversations on the list - someone else might have helped you
more promptly - others might benefit from following the conversation]

> This is how I have the code written:
>   if ($num_results > 0){
>     fopen("http://www.vcathletics.org/Misc/AdminMenu.htm","r";);
>   }
> If I go to that link directly, it works.  But command above just loads a
> blank page into the frame.  I know its working, because if $num_results is
> not > 0, I get the error echo.


Firstly, do you prove the contents of $num_results to be sure that the
then-clause is actioned?

Secondly fopen returns a value which is resource for use in later f*()
function calls - or which indicates that the open failed for some reason.
Please refer to: http://uk2.php.net/manual/en/function.fopen.php

fopen() only opens the file, or in this case web page. It is thereafter
necessary to read the file (several functions available) - and to fclose()
it later...

You talk about "loads a blank page into the frame". Do you want to read the
contents of the web page with a view to further processing (my example: read
the page and locate any links - to verify 'continuity'), or do you want to
'read' the page to present it within your output, eg one frame within a
frameset (in which case fopen() etc is probably not the best route)?

Regards,
=dn


> Brett,
> Works for me!
> Show your code,
> =dn
>
>
> > How do you load a standard web page from PHP.
> >
> > I thought, from what I read, that is was with fopen() ... but its not
> > working for me.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux