#1
  1. No Profile Picture
    fantom
    Guest
    Devshed Newbie (0 - 499 posts)
    Hey everyone... I just have one question:
    Can I use that <?php include ('...') ?> command inside the regular HTML/SHTML pages?
    And if not, how can I insert a .php3 page into an SHTML page (inside the table or whatever)...?

    Thank you all...
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    Can I use that <?php include ('...') ?> command inside the regular HTML/SHTML pages?


    No,You can't include a file inside a html page like <?php include('..')?> .for that your page should be a .php file....


    but you can include your .php3 file inside the html page using the "SSI include" directives...

    eg:
    <!--#include file="test.php3"-->

    you can place this directive inside your table...

    remember one thing,your server admin should enable "SSI directives"..otherwise you can't use it..

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited July 06, 2000).]
  4. #3
  5. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by fantom:
    Hey everyone... I just have one question:
    Can I use that <?php include ('...') ?> command inside the regular HTML/SHTML pages?
    And if not, how can I insert a .php3 page into an SHTML page (inside the table or whatever)...?

    Thank you all...
    [/quote]


    Not to contradict the answer previously, which is reasonably correct. However, you can effectively set up your server to parse
    and shtml document via the PHP processor.

    HOWEVER, there is no need to even remotely try to mix SSI with PHP. PHP naturally provides you all the power that SSI gives you, and a whole lot more for that matter.

    Frankly, with PHP and nearly any web server, you can effectively parse or treat a file extension with any processor.

    I have seen a number of places on the web that camoflauge their use of PHP, ASP, CFM etc, by naming the files with the .htm/.html extensions.

    It's really a matter of preference. You may wonder why they would do such a thing, and I personally think it has something to do with several of the major search engines, which often "check file extension" and will not index any extension which is a "dynamically generated" document.

    At any rate, the answer to your question, is taht you can "server process" "ANY" document extension, but you can not blend SSI with PHP or ASP, and so on...

    using include() is the same as <!--#include file|virtual="" -->

    etc..


    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. PDA/Palmtop or Pocket PC Can't Access to PHP pages!?
    By edwardkoo in forum PHP Development
    Replies: 2
    Last Post: January 29th, 2004, 07:39 PM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo