Announcement

Collapse
No announcement yet.

How do I do two <? include bla ?> in one .php file?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I do two <? include bla ?> in one .php file?

    On my main.php page I include my news file with a <? include ("../cgi-bin/newspro/news.txt") ?>

    Now I want to be able to call another file too:
    <? include ("another_file") ?>

    but as soon as I put that second call in the main.php file the news dissapear
    The second include is showing as it should...

    So anyone know how to include 2 files?

    Thanks a ton



  • #2
    ? That shouldn't happen

    Comment


    • #3
      Not sure if this is where it's applicable since I've never used it, but there is a function called include_once I believe, or something like that.

      I have multiple includes on most or all of my pages and they work fine as is. Are you sure you are using the proper opening and closing tags for each include?

      -jim

      Comment


      • #4
        it is very possible I don't have the correct clsoing tags.....

        How do they look?

        thanks

        Comment


        • #5
          it should look like:

          <?php include("myfile") ?>

          for debugging you can put

          <?php include("myfile") or die("unable to include myfile") ?>

          Comment


          • #6
            Moving to PHP coding.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X