GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Best way to use SSI and PHP at the same time (https://gfy.com/showthread.php?t=492426)

beemk 07-14-2005 08:57 PM

Best way to use SSI and PHP at the same time
 
i have a network of 31 sites. all of them use SSI on each page. I just got a script done to update the text easily but its a php script. what is my best solution? for ssi they have to be .shtml pages.

teksonline 07-14-2005 08:58 PM

impossible, call your SSI from php system execs and then print out the content

Alky 07-14-2005 08:59 PM

in .htaccess
AddType application/x-httpd-php .php .shtml

should work

Alky 07-14-2005 08:59 PM

maybe not.. i dont know .. lol :)

beemk 07-14-2005 09:06 PM

Quote:

Originally Posted by teksonline
impossible, call your SSI from php system execs and then print out the content

can you explain that in lamens terms?

Meorazhar 07-14-2005 09:25 PM

Why? It's absolutely possible. For me, the following SSI directive works perfectly:
<!--#include virtual="_header.phtml" -->
where _header.phtml is a php3 script.

I do it all the time.

4Pics 07-14-2005 09:43 PM

Php scripts do

<? virtual("/cgi-bin/script.cgi"); ?>

I prefer to run more php and do it that way when I need to run a cgi on the same page, but not all scripts work 100%

mikeyddddd 07-14-2005 09:51 PM

Quote:

Originally Posted by Meorazhar
Why? It's absolutely possible. For me, the following SSI directive works perfectly:
<!--#include virtual="_header.phtml" -->
where _header.phtml is a php3 script.

I do it all the time.

Me, too. But, I use .php instead of .phtml. Same thing.

garce 07-14-2005 09:52 PM

Quote:

Originally Posted by beemk
i have a network of 31 sites. all of them use SSI on each page. I just got a script done to update the text easily but its a php script. what is my best solution? for ssi they have to be .shtml pages.

This works for me. Add this to your .htaccess:

Code:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

If you're using .shtml then you'll probably want to add that extention.

Call your script like this:

Code:

<?php virtual ("/cgi-bin/script.cgi"); ?>
Another benefit is that you can run php files from html pages.


All times are GMT -7. The time now is 03:09 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123