<?php
//header("content-Type: text/html; charset=utf-8");
function getcwdOL(){
$total = $_SERVER[PHP_SELF];
$file = explode("/", $total);
$file = $file[sizeof($file)-1];
return substr($total, 0, strlen($total)-strlen($file)-1);
}
$currenturl= getcwdOL();//取得当前目录
$currenetFile="'"."http://".$_SERVER['SERVER_NAME'].":".$_SERVER["SERVER_PORT"].$currenturl."/1.doc'";
echo "var filepath=".$currenetFile.";alert(escape(filepath));";
//echo $currenturl;
?>