>I'm working on this site that is all shtml files... in order to add 
>some dynamic content, it just includes php scripts in different 
>places. However, sessions don't work unless you start it before 
>outputting anything to the server and that's what's needed now...
>
>I don't want to change all the links to end in .php and do the 
>includes in php just so I can put <? session_start(); ?> at the 
>beginning of all the pages.
>
>So I was trying to get the server to treat shtml files as both 
>server-parsed and as php scripts. Not working too well. ;)
>
>Anyone have any ideas?

You can't get Apache 1.x to treat the file as both SSI and PHP.  Period.

You could just make the first line of each file do whatever magic you do to
include PHP, and then it would be something not unlike:

----------- foo.shtml ----------------------
<!-- #EXEC session.inc --!>
More HTML and SSI here.
--------------------------------------------

I *THINK* if you do this, and have <?php session_start();?> in the
session.inc file, it will work...

I'm assuming there is no output to the browser by the <!-- #EXEC --> bit.

I'm also quite likely not doing SSI right, since I abandoned SSI for PHP
very rapidly.

-- 
Like Music?  http://l-i-e.com/artists.htm
Off-Topic:  What is the moral equivalent of 'cat' in Windows?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to