【发布时间】:2012-08-14 23:22:33
【问题描述】:
使用php我如何能够将变量$type定义为http://www.example.com的content-type
例如:$type定义为"text/html"
到目前为止,这是我正在使用的:
<?php
$url = 'http://www.example.com';
print_r(get_headers($url));
print_r(get_headers($url, 1));
?>
可以根据需要更改代码
【问题讨论】:
标签: php header content-type