Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default A new project/idea

    I'm thinking of starting a project, similar to ZedtuGEAR, which looks very nice might I add. I was just thinking about includes and echoing html taking forever, is it possible to do this
    PHP Code:
    <?php

    echo include(htmlfile.html);

    ?>
    if the html file is like
    HTML Code:
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>
    You know.. the general html file. or would it have to be
    PHP Code:
    <?php
    echo "<html>"
    echo "<head>" //etc.
    ?>
    ??
    How could this hapen to meeeeeeeeeeeeeee?lol.

  2. #2
    Join Date
    Feb 2008
    Location
    North Carolina, USA.
    Posts
    172
    Tokens
    0

    Default

    So you want the PHP code inside of the HTML code to run?

    Including just includes the file into the code. Read up on PHP theory.

    If you want to execute the PHP code from that you are going to either need to read the file, and get the contents, and do this:

    PHP Code:
    @eval ( '?>' . $page . '<?php ' );
    Not just like that.. I wouldn't recommending using eval everywhere either.

  3. #3
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Zedtu View Post
    So you want the PHP code inside of the HTML code to run?

    Including just includes the file into the code. Read up on PHP theory.

    If you want to execute the PHP code from that you are going to either need to read the file, and get the contents, and do this:

    PHP Code:
    @eval ( '?>' . $page . '<?php ' );
    Not just like that.. I wouldn't recommending using eval everywhere either.
    what.... what? I believe you are the one that needs to learn the php theory because just including a file will echo anything that isn't php.

    Also @ Reconix:
    PHP Code:
    <?php
    include("htmlfile.html");
    ?>
    will work just fine


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  4. #4
    Join Date
    Feb 2008
    Location
    North Carolina, USA.
    Posts
    172
    Tokens
    0

    Default

    PHP Code:
    <?php
    echo include("hey.html");
    ?>
    And

    Code:
    <?php
    echo "<html>";
    ?>
    You don't want to echo it, as its just going to return 1, 0.

    I don't see the point in what you are trying to do though.

    My bad.
    Last edited by Zedtu; 10-02-2008 at 10:28 PM.

  5. #5
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Basically, I hate coding html inside php its so time consuming with all the echos/prints etc. I was wondering if you could simply include a solely html file, inside a php file, the html file without having echos inside.
    How could this hapen to meeeeeeeeeeeeeee?lol.

  6. #6
    Join Date
    Feb 2008
    Location
    North Carolina, USA.
    Posts
    172
    Tokens
    0

    Default

    Still, that would waste time.. not sure how that would benefit the product? Would actually make it harder to understand, and a waste of time

  7. #7
    Join Date
    Jan 2007
    Location
    Canada eh?
    Posts
    766
    Tokens
    75

    Default

    Well to answer your question simply, the answer is yes. What I would do is make all your files PHP and do the following....

    index.php
    PHP Code:
    <?php include('html.php');?>
    html.php
    PHP Code:
    <html>
    <
    head>
    <
    title></title>
    </
    head>
    <
    body>
    </
    body>
    </
    html
    So, in other words having plain HTML in a PHP file that is being included will just echo out the contents normally, no PHP required in the file being included.

  8. #8
    Join Date
    Mar 2007
    Posts
    1,691
    Tokens
    1,025

    Latest Awards:

    Default

    Surprised to see Mythim (i think) in here complaining you typed the word "project" outside of "Web Design Projects".

    Good luck with it

  9. #9
    Join Date
    Sep 2006
    Location
    Evanston, Illinois.
    Posts
    2,361
    Tokens
    0

    Latest Awards:

    Default

    Ugh, I don't want to climb aboard that boat. You guys are always at eachother. btw awfy, would you consider the font [z] Arista, a drop shadow, a solid glow, and an inner shadow to be copying you, I personally think it's different...
    How could this hapen to meeeeeeeeeeeeeee?lol.

  10. #10
    Join Date
    Feb 2008
    Location
    North Carolina, USA.
    Posts
    172
    Tokens
    0

    Default

    Quote Originally Posted by Reconix View Post
    Ugh, I don't want to climb aboard that boat. You guys are always at eachother. btw awfy, would you consider the font [z] Arista, a drop shadow, a solid glow, and an inner shadow to be copying you, I personally think it's different...
    Why can't you use your "design skills" to make your own?

Posting Permissions

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