Results 1 to 8 of 8
  1. #1
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    I remember someone asking about SSI calls in PHP pages. I can't find the post, so I will assume that I either saw it in the chat, or I am getting senile.

    Anyway, do you think it is possible to use .htacces to enable ssi on php pages similar to enabling .htm or .html files, or will this just disable php?

    ----------------------------
    I can procrastinate tomorrow

  2. #2
    ABW Ambassador CrazyGuy's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,463
    My understanding of the mod rewrite rules in .htaccess is that they are essentially doing text manipulation - so in the examples I think you're referring to, they're effectively just changing the extension of the files the user requests to an extension the server will recognise and execute.

    It won't change the behaviour of PHP etc in itself.

    Based on my Perl experience, I think you need to be exploring a) pulling text in from an external file via PHP (instead of an "include virtual" SSI call) and/or b) executing perl or other cgi scripts from within PHP (instead of an "exec" SSI call).

    BTW - I did hold off replying to this in case someone who knows what they're talking about stepped in.

    Are you Crazy?

  3. #3
    Defender of Truth, Justice and the Affiliate Way
    Join Date
    January 18th, 2005
    Location
    The Swamp
    Posts
    7,503
    Wayder,

    That was Gordon in chat. As CG said, you can pull the info with php from a .txt file. Gordon did say he got it to work however and it was some other way. Gordon might have invented a bit of new coding. I don't remember exactly what he did, but check with him.

    Keep Your Hands Off My Cookies

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551


    ----------------------------
    I can procrastinate tomorrow

  5. #5
    ABW Ambassador
    Join Date
    January 17th, 2005
    Posts
    2,160
    Gordons code goes like this:
    <pre class="ip-ubbcode-code-pre"> &lt;? virtual('cgi-bin/nameofscript.cgi'); ?&gt; </pre>

    Mad Doctor Gfufy

  6. #6
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    I found another way to make the include.

    <pre class="ip-ubbcode-code-pre">&lt;?php require_once('http://www.domain.com/directory/file.name'); ?&gt;</pre>

    ----------------------------
    If at first you don't succeed, Click, Click, Click, Click, Click, Click, Click.

  7. #7
    Member
    Join Date
    January 18th, 2005
    Posts
    63
    I use &lt;?php include ("some_file.inc.php"); ?&gt;
    I don't think it matters at all what the extension is, PHP will just enter the contents of the file into the page. However, I'm fairly certain this is the standard way to include things in PHP (and having the include file end with .inc.php).

  8. #8
    ABW Ambassador FFoc's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,015
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Tweaker:
    However, I'm fairly certain this is the standard way to include things in PHP (and having the include file end with .inc.php).<HR></BLOCKQUOTE>
    The file extension is whatever you're happy with.
    However, if you use an extension that is "known to the server to be php", it will get parsed by the PHP plugin if someone accesses it directly - This is why most people use .php on the end of their includes, or have .inc set in their mimetypes, etc - they don't want people to read the info contained in the files.

    Setting the extension to .inc.php is just a way of telling yourself that this is not a full script, while still being "secure" from prying eyes...

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. inserting php in ssi
    By Cursal in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: December 21st, 2005, 10:04 PM
  2. Need help With SSI
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: December 8th, 2003, 08:35 PM
  3. ssi?
    By buyyourstuff in forum Cusimano.com Scripts
    Replies: 1
    Last Post: April 4th, 2003, 11:49 PM
  4. SSI Includes and PHP
    By jimbet7 in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: September 4th, 2002, 10:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •