|
Posted by Boldgeek on 01/16/07 21:52
murrayatuptowngallery@yahoo.com wrote:
> I have just started figuring out PHP as a server-side approach to
> something I did in Javascript.
>
> I never was able to figure out CGI on a remotely hosted web server the
> few times I tried (maybe wasnt' enabled?), but PHP is working fine...at
> least no problems at all, not my usual experience.
>
> What I would like to do is have the web page visitor access one page
> that 'calls' another so that the code isn't visible thru a web
> browser's 'View Source'.
>
> Can a .php or .htm file in the 'public', 'www', or 'html' directory
> access a .php file in for example the CGI-BIN area, or is there another
> way to do this?
>
> A visual example would probably help me more than a description.
>
> Thank you
>
> Murray
PHP has a command called
require ("page.php");
which will pull another page from the server into the current page,
whether this is PHP or HTML.
You can use it much like an "include" command to pull in PHP routines
or to pull in static chunks of HTML.
If you try to pull in a CGI file - eg somethign written in perl, it
will NOT execute on the server before being included, it will pull in
the raw source code and THEN try to execute it.
[Back to original message]
|