SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to include html pages with anchors?

    I'm using this little line to include a html page:

    <?php include("mypage.html"); ?>

    But I need to load that page at a specific anchor. That page is generated by a software so unfortunately, i cant change it. So i've tried:

    <?php include("mypage.html#myanchor"); ?>

    ...but it doesnt work. I was using the include in php because it apply the style of my php page to the html page.

    Thanks!

  2. #2
    hi galen's Avatar
    Join Date
    Jan 2006
    Location
    New Haven, CT
    Posts
    1,228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya that won't work. You want to include only the text after that anchor point? If so maybe use file() or file_get_contents() to get the file contents. Then just take whatever is after that anchor point.


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
  •