Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Nov 2001, 13:48
Hiroshimator Hiroshimator is offline
 
Join Date: Nov 2001
Help with includes

I always get errors like this when i include files from a different directory

Fatal error: Failed opening required './admin/config.php' (include_path='') in /home/win32asm/public_html/board/global.php on line 96


and it's because PHP doesn't take into account the directory according to the file i include but to the file from which i called the first include

How do I solution this?

Thank you very much

-H-
Reply With Quote
  #2  
Old 27 Nov 2001, 13:56
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
You use the chdir() function (Change Directory):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

chen@avinadav.com
Reply With Quote
  #3  
Old 27 Nov 2001, 14:00
Hiroshimator Hiroshimator is offline
 
Join Date: Nov 2001
ok, thx a lot

I'll try that.

I'm an experienced ASP and ColdFusion user but PHP is new to me.

Thx again

-H-
Reply With Quote
  #4  
Old 27 Nov 2001, 15:36
Mark Hensler's Avatar
Mark Hensler Mark Hensler is offline
 
Join Date: Oct 2001
I prefer to change the scope of included files rather than changing directories...

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It is important to have that colon! And there is no trailing slash.

PHP Docs: include_path, ini_get, ini_set()


You can also do this in .htaccess:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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


New To Site? Need Help?

All times are GMT. The time now is 07:40.

Layout Options | Width: Wide Color: