PDA

View Full Version : SSI code in PHP


paulus2000
01-01-2002, 11:12 AM
Is it possible to use an PHP code for running UCJ instead of the following SSI code?

<!--#exec cmd="./cgi-bin/ucj/ucjref.cgi"-->

e-van
01-01-2002, 11:26 AM
you'd be able to use the virtual() function, it's the only one I've seen working with php to make this function available :)

ComaToast
01-01-2002, 11:35 AM
<!--#exec cmd="./cgi-bin/ucj/ucjref.cgi"-->
<script language="php"> virtual("./cgi-bin/ucj/ucjref.cgi");
</script>

If you hade any include file calls like...
<!-- #include file="foo.txt" -->
...it would be...
<script language="php">
include("foo.txt")
</script>

SSI and PHP are HTML embedded scripting languages so both can't
be used on the same page.

richard
01-01-2002, 06:23 PM
<?php include("/path/to/file.ext"); ?>

ComaToast
01-01-2002, 07:32 PM
Originally posted by richard:
<STRONG>&lt;?php include("/path/to/file.ext"); ?&gt;</STRONG>
heh, I just put 'em out there, I don't gift wrap 'em. ;)

paulus2000
01-02-2002, 07:34 AM
Originally posted by ComaToast:
<STRONG>
&lt;script language="php"&gt; virtual("./cgi-bin/ucj/ucjref.cgi");
&lt;/script&gt;

If you hade any include file calls like...
&lt;!-- #include file="foo.txt" --&gt;
...it would be...
&lt;script language="php"&gt;
include("foo.txt")
&lt;/script&gt;

SSI and PHP are HTML embedded scripting languages so both can't
be used on the same page.</STRONG>

I tried
&lt;script language="php"&gt; virtual("./cgi-bin/ucj/ucjref.cgi");
&lt;/script&gt;

But it didn't work. I got the following message:

Warning: Unable to include './cgi-bin/ucj/ucjref.cgi' - request execution failed in /usr/home/ln/public_html/test.php on line 2

Sexxxboom
01-02-2002, 11:33 AM
Use then the most common tag:


&lt;?php include("/path/to/file.ext"); ?&gt;

paulus2000
01-02-2002, 12:17 PM
Originally posted by Sexxxboom:
<STRONG>Use then the most common tag:


&lt;?php include("/path/to/file.ext"); ?&gt;</STRONG>

That includes the ucjref.cgi file and doesnot execute it.