The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
PHP and SSI on the same page?
Discuss PHP and SSI on the same page? in the PHP Development forum on Dev Shed. PHP and SSI on the same page? PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

February 16th, 2000, 07:54 PM
|
|
Junior Member
|
|
Join Date: Feb 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Can I have PHP and SSI output on the same page?
If so, what do I need to add to my .htaccess file? I've tried various combinations, but so far I've managed to get only one or the other on my page.
Any help appreciated.
Thanks, Diana.
|

February 17th, 2000, 11:25 AM
|
|
Registered User
|
|
Join Date: Dec 1999
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
If you have Apache Web Server, you may be able to use the virtual() command in PHP to do SSI:
Exmample:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
if($banner):
virtual('/cgi-bin/banner.cgi');
endif;
[/code]
Its the only thing I've ever got to work.
|

February 17th, 2000, 07:42 PM
|
|
Junior Member
|
|
Join Date: Feb 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Thanks Dave
I have, as you suggest, managed to mimic SSI using include and virtual. This is all I need most of the time. I would like to be able to use true SSI sometimes though on a page that also uses PHP. I suspect it's possible by tweaking the .htaccess. If I'm wrong would someone please let me know?
(And if I'm right, how do I do it?)
Thanks a lot,
diana.
|

February 18th, 2000, 07:47 AM
|
|
Apprentice Deity
|
|
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237

Time spent in forums: 4 m 8 sec
Reputation Power: 17
|
|
|
I'm curious why you want to do this? There isn't anything that you can do using SSI that can't be done in PHP.
|

February 18th, 2000, 09:05 AM
|
|
Contributing User
|
|
Join Date: Dec 1999
Location: Netherlands
Posts: 77
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rod k:
I'm curious why you want to do this? There isn't anything that you can do using SSI that can't be done in PHP.[/quote]
Well, I had the same problem. That is, if PHP isn't installed as an Apache module, you can't use the virtual() function.
|

February 18th, 2000, 09:27 AM
|
|
Apprentice Deity
|
|
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237

Time spent in forums: 4 m 8 sec
Reputation Power: 17
|
|
|
I was referring to non-virtual() type SSI. Re-read the post I was replying to.
|

February 19th, 2000, 07:28 AM
|
|
Junior Member
|
|
Join Date: Feb 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I have a 100-page+ site with lots of includes and scripts with SSI calls. I'm moving to a new server which supports PHP. I would like to add PHP functionality, without having to change everything.
|

February 21st, 2000, 08:33 PM
|
|
Junior Member
|
|
Join Date: Feb 2000
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
So now that we've established WHAT I want to do, and WHY I want to do it, does anyone know HOW ?
:-}
|

February 21st, 2000, 09:38 PM
|
|
Contributing User
|
|
Join Date: Jan 2000
Posts: 79
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by diana:
So now that we've established WHAT I want to do, and WHY I want to do it, does anyone know HOW ?
:-}[/quote]
Includes can be done in php using the include() function.
eg <? include ("header.txt") ?>
What kind of "scripts with SSI calls" do you have?
Basil
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|