php include

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

    • May 2007
    • 2

    php include

    what i'm doing wrong...
    just not understand

    this

    <?php include('http://www.xxxxx.xxx/cgi-bin/news/ex...h/procura.html); ?>

    is not equal to

    <?php include('/home/xxxxxxx/public_html/cgi-bin/news/exec/search.cgi?search=1&perpage=5&cat=3&template=searc h/procura.html')

    I canīt use the first because fopen = false

    and the second don't get the data

    Can someone help

    Best Regards
  • cathedral
    Private

    • May 2007
    • 2

    #2
    Re: I simple canīt believe this...

    i start to get it

    i want to call a file from the server root and now is this statement i'm calling the file from inside the directory where the file resides.

    can someone help me to make the statement include from the root (server root)

    Best Regards

    Comment

    • Karen Mac
      General

      • Apr 2006
      • 8332

      #3
      Re: I simple canīt believe this...

      Well first you have to use the closing ?> parameter and then you need to remove the /cgi-bin if you want it at the root or move it to the cgi bin/news etc

      Karen

      VodaHost

      Your Website People!
      1-302-283-3777 North America / International
      02036089024 / United Kingdom
      291916438 / Australia

      ------------------------

      Top 3 Best Sellers

      Web Hosting - Unlimited disk space & bandwidth.

      Reseller Hosting - Start your own web hosting business.

      Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: php include

        <?php
        include('/home/username/public_html/cgi-bin/news/exec/search.cgi?search=1&perpage=5&cat=3&template=searc h/procura.html');
        ?>



        Remove the white space at the end: search/procura.html . Add ; at the end before the closing tag.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • Watdaflip
          Major General

          • Sep 2005
          • 2116

          #5
          Re: php include

          And the reason that this didn't work was for several reasons

          <?php include('http://www.xxxxx.xxx/cgi-bin/news/ex...h/procura.html); ?>


          First, you didn't close the end of it with a ', before the );

          Secondly, you can't use a full http:// link with a php include. Rather, you need to use a relative link.

          If you have say..





          If on www.yoursite.com/index.php you would use
          <? include("include_directory/header.php"); ?>

          If on www.yoursite.com/sub_directory/index.php you would use
          <? include("../include_directory/header.php"); ?>

          Register/Login Script
          Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

          Comment

          Working...
          X