PHP as an Include Page?

  • Thread starter Thread starter Auerbach
  • Start date Start date
A

Auerbach

Using FP 2003, can one place a page generated by a PHP application as an
"Include" in an HTML page?

Alex
 
No.

The page would have to be a PHP page and this is really not a FP issue.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
No, because the FrontPage Include Page component operates at authoring time,
and not at browse time.

You would have to use an "include" feature that runs at browse time, such as
SSI or some custom ASP or PHP code.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
ASP supports includes, however they are not dynamic. The ASP includes
are not the same as the FP includes.

You may want to look into redirect or server.transer if it's available
in PHP (it's avalble in ASP).

...PC
 
P C said:
ASP supports includes, however they are not dynamic.

Actually, ASP includes are SSI includes, and as such they *are* dynamic. I'm
talking about includes of the form:

The ASP includes
are not the same as the FP includes.

You may want to look into redirect or server.transer if it's available
in PHP (it's avalble in ASP).

...PC

Response.Redirect and Server.Transfer are both mechanisms that make the
browser display a different page than the Web visitor requested. They have
nothing to do with displaying the contents of one file withn another.

Alex, or Auerbach, I presume you want a PHP page to store or append variable
data in some file, and then display those contents as part of another file.
This is where you'd use an SSI (Server Side Include) assuming your Web server
supports those.

If you had some other reason for asking the original question, please
explain in greater detail what you're trying to accomplish.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Jim, I agree. Let me clarify what I meant.
ASP is dynmuc. The ssi/asp includ are "static". Teh inlude ifle is
incled when the parent file is called at the server. You cannot
dynamically decide whter to inlude it or not or whter to inluded a
diffrent fil based on some criteria.

Since it looks to me that the poster wants to prent diffrent content
nased on soem critri i sufgested that ther are ither wasy of acheiving
the desired result, such as redirecting or transfering to another page
to can present the desired content.

Another way is to write script code to produce the HTML code for the
contnet you want to display. For exmaple in speuod coe

<soem page content>

If contition1
Then wwrite HTML code for choice 1 contnete
If condtion2 write HTML code for choice 2 contnet

<some more page content.>


Jim is also right that if you provde more datils on your reason you make
get an on target repsonse.

....PC
 
ASP can be used to dynamically include includes by doing the following:

<% If something = 1 then %>
<!--- #INCLUDE FILE = "page1.asp" --->
<% Else %>
<!--- #INCLUDE FILE = "page2.asp" --->
<% End If %>


--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Well yeah, it depends what you mean by "dynamic".

I presumed it meant "included on the fly during earh request," and that
something involving if-then-else logic would be a "conditional include".

Of course, neither "dynamic" nor "conditional" are precise terms, and thus
comes the confusion.

Jim Buyens
Microsoft MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
What is not allowed, is the passing of name of a include as a variable and then loading the include
specified in the variable.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Jim,

Thanks for the response. It is a straightforward site, www.Franzetta.com,
done with FP 2003 and dynamic web templates. One page,
http://www.franzetta.com/careers.php, presents a list of jobs available.
(The listings are dynamically pulled from a MySQL database.) My thought was
to tuck this PHP page into an HTML page as an "include," so it would inherit
the shared borders.

I tried doing this in FP 2003, using "insert web component | included
content | page" and selecting the careers.php page, but this did not work.

Alex
 
Use a IFrame.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
That works. Thanks!

Alex

Thomas A. Rowe said:
Use a IFrame.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Back
Top