Posted: Sun Sep 11, 2005 7:34 am
SSI will not parse inside of php unless SSI knows it can, but then it ceases to be php...
Could you start using the code posting tags like
Code: Select all
andCode: Select all
please?A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
andCode: Select all
please?Code: Select all
andCode: Select all
but have no idea how to!
If you could possibly give an example I'll try it out immediately.
I presume you mean useCode: Select all
instead of <?php but where do I use theCode: Select all
portion?
Thanks in advance
NikhilCode: Select all
<?php
$art = mt_rand(0, 50);
if($art == "0") {
include("article.inc");
} else {
include("article" . $art . ".inc");
}
?>Code: Select all
test 3Code: Select all
<!--#include virtual="rotate.php-->Code: Select all
#!/usr/bin/php
<?php
...
?>Code: Select all
#!/home/nparekh/public_html/mortgage
<?php
$art = mt_rand(0, 50);
if($art == "0") {
include("test.txt");
} else {
include("test" . $art . ".txt");
}
?>Code: Select all
<!--#include virtual="rotate.php-->Ok, you haven't read (or understood) the links i provided. You would need to add the path to the php interpreter (not the scripts). For example if php-cli.exe is in c:/php you would need !/c:/php/php-cli.exe. On a unix webhost, the interpreter is usually at /usr/bin, /usr/local/bin, .. ("which php" in a shell will give a good hint)nparekh wrote:Code: Select all
#!/home/nparekh/public_html/mortgage