Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: PHP Navigation

  1. #11
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    So what's the difference in that and
    Code:
    echo file_get_contents('filename.htm');
    ?
    - Mike

  2. #12
    Join Date
    Aug 2006
    Location
    Ohio
    Posts
    266
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is my placing wrong? I put the require in the body section of the page I want it displayed on. I think the issue is that I am trying to do that 2 times, once to display the job page in the Page of the CMS and another time to include the pages that the job page navigation is calling. Could that be a problem?

  3. #13
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I don't think that using the function twice would be an issue.

    using the variation of require_once(); would be, but only if you are doing so to the same file (since that's the point of the _once, where it just includes/requires that page one time)

    mburt, there is no difference.
    However, require and include also include the php. on a remote server, it just grabs the text and outputs, but one your server, it evaluates the code as part of the document.

    like:

    <?php

    require('test.php');

    echo $var;

    ?>

    And if test.php was:

    <?php
    $var='test';
    ?>

    Then the main page would output 'test'.

    However, that's not relavant here, I don't think.

    If the php on the included page shouldn't be parsed (as it won't be with .htm extensions, unless they're set to be parsed on the server configuration), then it won't be any different from file_get_contents, echo...
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #14
    Join Date
    Aug 2006
    Location
    Ohio
    Posts
    266
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help, I guess I will have to look through the code and search for the problem, it probably something simple I missed

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
  •