求《PHP典型模块与项目实战大全》明日科技出版的光盘内容 15
展开全部
<?php
echo ' web-root = '.$_SERVER['DOCUMENT_ROOT'].'<br>';
echo ' current-file = '.__FILE__.'<br>';
echo ' current-dir = '.dirname(__FILE__).'<br>';
echo ' http-root = '.$_SERVER['HTTP_HOST'].'<br>';
echo ' web-position = '.$_SERVER['PHP_SELF'].'<br>';
$file='c:/webroot/index.php';
echo ' file-position = '.$file.'<br>';
$fileWebAddress='http://'.str_replace($_SERVER['DOCUMENT_ROOT'],$_SERVER['HTTP_HOST'],$file);
echo ' file-web-position = '.$fileWebAddress.'<br>';
?>
echo ' web-root = '.$_SERVER['DOCUMENT_ROOT'].'<br>';
echo ' current-file = '.__FILE__.'<br>';
echo ' current-dir = '.dirname(__FILE__).'<br>';
echo ' http-root = '.$_SERVER['HTTP_HOST'].'<br>';
echo ' web-position = '.$_SERVER['PHP_SELF'].'<br>';
$file='c:/webroot/index.php';
echo ' file-position = '.$file.'<br>';
$fileWebAddress='http://'.str_replace($_SERVER['DOCUMENT_ROOT'],$_SERVER['HTTP_HOST'],$file);
echo ' file-web-position = '.$fileWebAddress.'<br>';
?>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询