Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > mySQL & PHP

Notices

mySQL & PHP Discussions, information and help with mySQL and PHP.

Reply
 
LinkBack Thread Tools
  #1  
Old 06-04-2007, 09:17 PM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 06-04-2007, 10:09 PM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 06-05-2007, 02:49 AM
Karen Mac's Avatar
Lieutenant General
 
Join Date: Apr 2006
Posts: 3,765
Send a message via MSN to Karen Mac
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
__________________
KMAC Enterprise
Granny's Country Nook 10%Off, your code: Forum Discounts
Charming Noveltees~Sports Logos Charms, Jewelry, Collectibles- 10% off, your code: VodaHost
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 06-05-2007, 05:11 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 9,125
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 06-05-2007, 10:49 PM
Watdaflip's Avatar
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,638
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 10:16 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2007 VodaHost.com - All Rights Reserved

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 50 51 52 53 54 55