Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member Bilal's Avatar
    Join Date
    Jun 2003
    Location
    Planet Bob
    Posts
    8
    Member #
    1851
    Hi,
    I saw a thread in WDF, that somebody post a code, through which we can include the HTML without any need to alter it (pure html).

    Can please anybody help me? I seach WDF, but can't find that thread again!!!

  2.  

  3. #2
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    I was following you, no problem, until you mentioned "pure html". I'm not 100% sure what you mean by that. Maybe this is what you mean:

    if you have a file, say html, you could include that file in a php statement. So let's say you have your basic page header in a file called header.html and you wanted to include that, this is what you could do.

    Code:
    <? 
    include("/the/path/to/file/header.html");
    ?>
    
    ... html blah blah
    I cannot self terminate, you must lower me into the fire.

  4. #3
    Junior Member Bilal's Avatar
    Join Date
    Jun 2003
    Location
    Planet Bob
    Posts
    8
    Member #
    1851
    Thanks for the help, by pure html I mean, we don't have to care but inserting / before " and other php rules, I remember, that the syntax is such like that (not sure)

    <? html

    ?>

    Again, I am not sure about it......

  5. #4
    Senior Member ajaspers's Avatar
    Join Date
    Apr 2003
    Posts
    149
    Member #
    1150
    What? Where did you get that from?
    PHP Code:
    <?php
    // php code
    ?>
    <html>
    <head>
    ...
    </head>
    <body>
    <?php
    // some more php code
    ?>
    </body>
    </html>

  6. #5
    Member nepharo's Avatar
    Join Date
    Jun 2003
    Posts
    73
    Member #
    1729
    I'm with ajaspers. I never hear of that but that doens't mean it doesn't exist. Well, if you're planning to include html, I would sugest doing it the above way. I never heard of another way of doing it. If you want to use php, you have to make some sacrifices
    :chinese:
    I cannot self terminate, you must lower me into the fire.

  7. #6
    Senior Member iphong's Avatar
    Join Date
    Mar 2003
    Location
    Arlington, VA
    Posts
    751
    Member #
    916
    Example for adding html in PHP and PHP in HTML:
    PHP Code:
    <? 
    $a 
    1;
    for (
    $i=0;$i<3;$i++) {
    $a++;
    ?>
    <table>
    <tr>
    <td>Table <? echo $a?></td>
    </tr>
    </table>
    <? 
    }
    ?>
    Vu Tuan Phong
    iPhongDesign

    http://iphong.com
    http://adstudio1.com

  8. #7
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    Read the second post in this thread, it discusses shtml, which sounds like what you're talking about.

  9. #8
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    What you're referring to is merely using php's single quotes.. it's a workaround that saves a lot of trouble SOMETIMES.

    i.e.

    PHP Code:
    $myhtml '
    <a href="doublequoteswork.html">No need to change!</a>'

    However, you cannot put varaibles into this as it will print it out EXACTLY as typed in, also you cannot use single quotes without escaping them.
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:36 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com