Search Members Help

» Welcome Guest
[ Log In :: Register ]

 

[ Track This Topic :: Email This Topic :: Print this topic ]

reply to topic new topic new poll
Topic: SSI's in PHP< Next Oldest | Next Newest >
 Post Number: 1
Spydir Web Search for posts by this member.
FNG
Avatar



Group: Members
Posts: 13
Joined: Apr. 2001
PostIcon Posted on: Mar. 24 2001,21:50  Skip to the next post in this topic. Ignore posts   QUOTE

ok... this has been bothering me for awhile... how do I get a SSI into a PHP file with out editing httpd.conf (this is on my webhost so I can't change filename things).

I know how to do SSI's and stuff, it's just I have to put one into news.php so that the page'll have my layout stuff, but SSI's have to be in .shtml files ... I asked my webhost and they haven't responded with anything, and that was a couple weeks ago.

------------------
Spydir Web - http://netsyndrome.net/spydirweb/
Net Syndrome - http://www.netsyndrome.net/

Sometimes you're the dog, sometimes you're the hydrant...

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 2
incubus Search for posts by this member.
mack daddy
Avatar



Group: Admins
Posts: 1316
Joined: May 2000
PostIcon Posted on: Mar. 25 2001,03:08 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

I dont know PHP but I know Perl - if theyre similar then why bother with a SSI? Surely you can just open the text file in PHP and use it in the HTML output? If you're dealing with newspro I think it chucks out text files, surely you can just open the file and parse it as part of PHP?

Just my 2 cents, remember i don't know php

Mike

------------------
-- incubus
As I chase the leaves like the words I never find ...

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 3
cr0bar Search for posts by this member.
FNG
Avatar



Group: Members
Posts: 733
Joined: May 2000
PostIcon Posted on: Mar. 25 2001,04:56 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

You don't need to use SSI calls if your pages are being parsed for PHP, just use include():

include "/path/to/file.inc";
-or-
include("/path/to/file.inc");

If you need to exec cgi, use virtual():
virtual("/cgi-bin/newspro.cgi");

You can only parse for multiple preprocessors (i.e. SSI or PHP) in Apache 2.0 and higher, but it's still in beta.

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 4
Spydir Web Search for posts by this member.
FNG
Avatar



Group: Members
Posts: 13
Joined: Apr. 2001
PostIcon Posted on: Mar. 26 2001,00:38 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

what I'm doing is a dinky little weblog. It uses news.php to add news, and latest.php to list the 5 newest articles, which reads from article_summary.html for the list of articles. What the SSI is supposed to do is something like <!-- #include "lasest.php" --> to list the news. I've tried the include() thing but it don't exactly work, and I made lastest.php output to a variable and I tried echo'ing the varible, but that doesn't work either. I'm probably doing something wrong, but if you can understand that "help a brovah out, y0"...

------------------
Spydir Web - http://netsyndrome.net/spydirweb/
Net Syndrome - http://www.netsyndrome.net/

Sometimes you're the dog, sometimes you're the hydrant...

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 5
KL1NK Search for posts by this member.
the guy behind the guy
Avatar



Group: Members
Posts: 161
Joined: Jan. 2001
PostIcon Posted on: Mar. 27 2001,18:58 Skip to the previous post in this topic.  Ignore posts   QUOTE

speaking of php....is http://www.php.net down for anyone else?
Offline
Top of Page Profile Contact Info WEB 
4 replies since Mar. 24 2001,21:50 < Next Oldest | Next Newest >

[ Track This Topic :: Email This Topic :: Print this topic ]


 
reply to topic new topic new poll

» Quick Reply SSI's in PHP
iB Code Buttons
You are posting as:

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code