SEO Software
Closed Thread
Results 1 to 4 of 4

Thread: How to include ASP and PHP in one HTML page

  1. #1

    Cool How to include ASP and PHP in one HTML page

    All in One Dynamic Script both ASP and PHP into one html file it simple but interesting technique moreover it can use for insert a little ASP or PHP script into html file.


    This is method to run both ASP and PHP in one page by using javascript. When we want to use dynamic script in html file.There is 3 ways to do this
    1.Using <iframe> tag
    2.Call by SSI (Server Side Include)
    3.Javascript

    This article I use javascript because It can support all browser,now you can follow me to do this

    1.filePHP.php

    <?php $word="This is way to"; ?>
    document.write("<?php echo $word; ?>");
    *remark - don't have this tag( <!-- Comment --> , " ,\n ) in file.If you want to use \n you can replace with <br>.

    2.fileASP.asp

    <%
    Dim word
    word
    = " include ASP and PHP"
    %>
    document.write("<%= word %>");
    *remark - don't have this tag( <!-- Comment --> , " ,\n ) in file.If you want to use \n you can replace with <br>.

    3.dynamic.html

    <script language="Javascript" type="text/javascript" src="filePHP.php"></script>
    <script language="Javascript" type="text/javascript" src="fileASP.asp"></script>


  2. SEO Software

  3. #2

    Default

    nice tutorial =D (didn't even know something like this was possible to do o_O; it'll definatly come in handy for me ^_^ and it works like a charm. love to read more of your tutorials~ kudos and thank yous for you ^__^

  4. #3

    Default

    That's fine but I prefer using SSI (Server Side Includes) which is supported by most servers nowadays.

    Make sure that your file is a SHTML one

    The syntax of SSI is as simple as folow
    <!--#directive parameter=value parameter=value -->

    Here are some example

    <!--#include virtual="navbar.html"-->
    <!--#exec cgi="/something.cgi"-->
    Get more information at this page
    http://en.wikipedia.org/wiki/Server_Side_Includes

  5. #4

    Default

    wow. Nice tutorial. Thank your for sharing that tutorial you have. It can help for many webmasters. This tutorial is very helpful to everyone not only to webmasters but also to those who wnated to learn about it. Keep on sharing what you have. thansk a lot. I really appreciate your kindness.

Closed Thread

Bookmarks

Posting Permissions

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