开发者

SITE_ROOT = URL + Variable? [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜