Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    including PHP in .html pages

    OK, I've been trying to find out how you do this ever since I started coding, so what I want to find out is, there are services out there, for example tag-board, counters and stuff that you can sign up for and then you include this script in your page and where you placed this script is where the tag-board/counter etc will come up.

    the script usually starts with
    <script ...></script>

    how do they do this when obviously people can include this in their NON php/asp etc pages and it will show up.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    <script src="http://www.domain.com/counter.php"></script>

    makes the page load counter.php which is parsed as a PHP file , normally no output is expected expected/generated though your script can output valid javascript.

    same goes for <img src="http://www.domain.com/counter.php" /> , again counter.php can do its stuff and output a 1px*1px image so as not to break anything.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

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