Excel一个文档引用另一个文档的内容的时候,怎么使用一个相对路径?

2025-04-08 02:54:51
推荐回答(1个)
回答1:

php相对路径

echo ' web-root = '.$_SERVER['DOCUMENT_ROOT'].'
';
echo ' current-file = '.__FILE__.'
';
echo ' current-dir = '.dirname(__FILE__).'
';

echo ' http-root = '.$_SERVER['HTTP_HOST'].'
';
echo ' web-position = '.$_SERVER['PHP_SELF'].'
';

$file='c:/webroot/index.php';
echo ' file-position = '.$file.'
';

$fileWebAddress='http://'.str_replace($_SERVER['DOCUMENT_ROOT'],$_SERVER['HTTP_HOST'],$file);
echo ' file-web-position = '.$fileWebAddress.'
';

?>