SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how i insert file php in page html by java ??

    please
    whay this code not works ?

    PHP Code:
    <script type="text/javascript" src="http://www.site.com/1.html"></script> 

    please help me !!

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Because it's not a javascript file, its an HTML file.
    if you are trying to include a file you will need to look into include() function or cURL in php
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    code java

    thank you

    i using cod :
    PHP Code:
    <script type="text/javascript" src="http://www.site.com/ads.php?id=12"></script> 
    this code not work in haeder site (html file)


    i want code like
    PHP Code:
      <script>
    document.write('<script language=\"JavaScript\" src=\"http://exchange.arabictop.com/ad_view.php?uid=21238&ran='+Math.random()+'\"><\/script>');
    </script><noscript><a href="http://www.arabictop.com"></a></noscript> 

  4. #4
    SitePoint Addict richtestani's Avatar
    Join Date
    Nov 2003
    Location
    Bridgeport
    Posts
    292
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To include a php file, you must use php syntax because it needs to be parsed prior to sending the html file.

    Code:
    <?php
    include('ads.php?id=1');
    ?>
    Your php file should have all the proper code to output whatever you need, in php of course.
    RichTestani
    -------------------------------
    http://www.junkdepot.com
    http://www.rareoopdvds.com | The Movie Poster Site


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
  •