homepage Welcome to WebmasterWorld Guest from 107.20.25.215
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Can I execute PHP with SSI include? or vice versa
geogola




msg:1285490
 10:48 pm on Jan 9, 2003 (gmt 0)

i'd like to SSI include a .php file so it would actually run the code or if that's not possible in any way then can i php include a CGI file so it would execute.

thanks, gola

 

jatar_k




msg:1285491
 11:14 pm on Jan 9, 2003 (gmt 0)

Welcome to WebmasterWorld geogola,

I don't think including a php file with SSI will work. If you have SSI enabled for a file extension then, I don't think, adding php parsed as well will work.

I would use the php extension on that particular page and then include the file using the php include or require function.

andreasfriedrich




msg:1285492
 11:20 pm on Jan 9, 2003 (gmt 0)

Let me welcome you to WebmasterWorld [webmasterworld.com] as well geogola.

Be sure to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post.

On Apache you may include the results of a CGI script with PHP´s virtual [php.net] function which performs a subrequest. This is similar to <!--#include virtual --> in SSI.

Andreas

andreasfriedrich




msg:1285493
 11:24 pm on Jan 9, 2003 (gmt 0)

SSI includ[ing] a .php file so it would actually run the code is possible as well but not advisable. You could just use <!--#include virtual --> and have the PHP CGI binary execute and run the PHP code. But why would you want to do that when there is the PHP Apache module available which save the server from having to start a new process, etc.

Andreas

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved