(PHP 4, PHP 5, PHP 7)
apache_lookup_uri — 锟斤拷指锟斤拷锟斤拷 URI 执锟叫诧拷锟斤拷锟斤拷锟襟并凤拷锟斤拷锟斤拷锟斤拷锟叫癸拷锟斤拷息
$filename
) : object锟斤拷锟斤拷锟斤拷锟斤拷一锟斤拷 URL 执锟叫诧拷锟斤拷锟斤拷锟斤拷取锟斤拷锟斤拷锟斤拷锟叫关革拷锟斤拷锟斤拷源锟斤拷锟斤拷要锟斤拷息锟斤拷锟酵o拷帧锟�
锟斤拷 锟斤拷锟节斤拷 PHP 锟斤拷装为 Apache 模锟斤拷时锟斤拷支锟街此猴拷锟斤拷锟斤拷
filename
锟斤拷锟斤拷锟斤拷锟斤拷募锟斤拷锟斤拷锟経RI锟斤拷锟斤拷
一锟斤拷锟叫癸拷 URI 锟斤拷息锟斤拷 object锟斤拷锟斤拷 object 锟斤拷锟斤拷锟斤拷锟叫o拷
Example #1 apache_lookup_uri() 锟斤拷锟斤拷
<?php
$info = apache_lookup_uri('index.php?var=value');
print_r($info);
if (file_exists($info->filename)) {
echo 'file exists!';
}
?>
锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�
stdClass Object ( [status] => 200 [the_request] => GET /dir/file.php HTTP/1.1 [method] => GET [mtime] => 0 [clength] => 0 [chunked] => 0 [content_type] => application/x-httpd-php [no_cache] => 0 [no_local_copy] => 1 [unparsed_uri] => /dir/index.php?var=value [uri] => /dir/index.php [filename] => /home/htdocs/dir/index.php [args] => var=value [allowed] => 0 [sent_bodyct] => 0 [bytes_sent] => 0 [request_time] => 1074282764 ) file exists!