HighDots Forums  

OT: PHP includes and path woahs

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss OT: PHP includes and path woahs in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Macromedia
 
Posts: n/a

Default OT: PHP includes and path woahs - 02-15-2005 , 03:47 AM






Hi there,

I am getting really confused.

I use the following PHP include:

<? include ("../inc/quotes/common.php"); ?>

but when I upload i get tonnes of errors saying file not found.

Am I doing something wrong?

Thanks



Reply With Quote
  #2  
Old   
Ross Riley
 
Posts: n/a

Default Re: OT: PHP includes and path woahs - 02-15-2005 , 04:19 AM






The php include path is often different to the normal document root. Make an
info file called info.php that contains just the following... <?php
phpinfo();?> Upload and run this file to see what the value of PHP Include Path
is. Often it's just one step outside the web root so you may need to go down
another level..... ie. <?php include ('/www/inc/quotes/common.php'); ?> Ross


Reply With Quote
  #3  
Old   
Joe {RoastHorse}
 
Posts: n/a

Default Re: OT: PHP includes and path woahs - 02-15-2005 , 07:05 AM



the include path usually starts with '.' (current directory) so the
script will look for a relative URL first, this should work (if '../inc'
is in your document root):

include ("../inc/quotes/common.php");

if 'inc' is the directory that you have set up as your include path then
your script should look like this:

include ("quotes/common.php");


joe





Ross Riley wrote:
Quote:
The php include path is often different to the normal document root. Make an
info file called info.php that contains just the following... <?php
phpinfo();?> Upload and run this file to see what the value of PHP Include Path
is. Often it's just one step outside the web root so you may need to go down
another level..... ie. <?php include ('/www/inc/quotes/common.php'); ?> Ross

--

=================================

Kanzo Limited
www.kanzostudio.com

=================================


Reply With Quote
  #4  
Old   
Macromedia
 
Posts: n/a

Default Re: OT: PHP includes and path woahs - 02-15-2005 , 09:29 AM



Hi there,

Thanks for the advice.

I used the info.php and noticed that 'Virtual Directory Support' was
disabled. Is this why I am getting the error?

Thanks



Reply With Quote
  #5  
Old   
Joe {RoastHorse}
 
Posts: n/a

Default Re: OT: PHP includes and path woahs - 02-15-2005 , 09:44 AM



doubt it. can you tell me:

1/ what is the value of include path
2/ what is the value of document root
3/ what is the system path to the file you want to include
4/ what is the error message


joe



Macromedia wrote:
Quote:
Hi there,

Thanks for the advice.

I used the info.php and noticed that 'Virtual Directory Support' was
disabled. Is this why I am getting the error?

Thanks


--

=================================

Kanzo Limited
www.kanzostudio.com

=================================


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.