开发者

SITE_ROOT = URL + Variable? [duplicate]

开发者 https://www.devze.com 2023-04-07 17:55 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: SITE_ROOT = Variable?
This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

SITE_ROOT = Variable?

How can I get this:

define ('SITE_ROOT', $_SERVER['DOCUMENT_ROOT'] . SITE_BASE);

to look something like this:

define ('SITE_ROOT', [variable from domain.com/dir/data.php] );

I'd very much appreciat开发者_开发知识库e if someone could help me with a solution.

Many thanks.


You probably need to include the data.php file before you define the SITE_ROOT constant. Like this:

<?php
   require_once('data.php');
   define('SITE_ROOT', $yourVariableFromDataDotPHP); 
?>

Although it looks a bit weird...don't know the context of course.

0

精彩评论

暂无评论...
验证码 换一张
取 消