+ Reply to Thread
Results 1 to 5 of 5

Thread: php include
      
   

  1. #1
    cathedral is offline Private
    Join Date
    May 2007
    Posts
    2

    Default 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

  2. #2
    cathedral is offline Private
    Join Date
    May 2007
    Posts
    2

    Default 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

  3. #3
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,354

    Default 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
    07031847328 / United Kingdom

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

    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)



  4. #4
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,060

    Default 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!


  5. #5
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default 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..

    www.yoursite.com/index.php
    www.yoursite.com/sub_directory/index.php
    www.yoursite.com/include_directory/header.php

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49