vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Include path, $DOCUMENT_ROOT (https://vborg.vbsupport.ru/showthread.php?t=51698)

gmarik 04-16-2003 06:04 PM

Include path, $DOCUMENT_ROOT
 
A non vb related php question. I have a hoster, and he has different php.ini file configuration, so there are several problems with that. The biggest of them is:

Include paths. Those, who work on the root level, don't work in the folders, that is - on the second level.
config.inc.php:
Code:

$root = "http://www.complex-systems.ru";
include ("$root/elem/func.inc.php");
include ("$root/elem/lang.inc.php");

It works here: http://www.complex-systems.ru/, but does not works any more here: http://www.complex-systems.ru/requisites/

I thought $_SERVER["DOCUMENT_ROOT"] could be a good idea, but is seems the promlem has not been solved yet. Do you have an idea or a sollusion. I'm making a CMS tool.

Kriek 04-18-2003 09:24 PM

Method no.1 (SERVER_NAME)

PHP Code:

$root $_SERVER['SERVER_NAME']; 
include(
'http://' $root '/elem/func.inc.php');
include(
'http://' $root '/elem/lang.inc.php'); 

Method no.2 (DOCUMENT_ROOT)

PHP Code:

$root $_SERVER['DOCUMENT_ROOT'];
include(
$root '/elem/func.inc.php');
include(
$root '/elem/lang.inc.php'); 



All times are GMT. The time now is 01:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02012 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete