PHP header() examples
//用这个header指令来解决URL重写产生的404 header
header('HTTP/1.1 200 OK');
// 页面没找到
header('HTTP/1.1 404 Not Found');
// 访问受限
header('HTTP/1.1 403 Forbidden');
// The page moved permanently should be used for
// all redrictions, because search engines know
// what's going on and can easily update their urls.
//页面被永久删除,可以告诉搜索引擎更新它们的urls
//PS:第一次碰到这个指令,不知道能不能用来把自己的站点从搜索引擎中删除呢?
header('HTTP/1.1 301 Moved Permanently');
// 服务器错误
header('HTTP/1.1 500 Internal Server Error');
// 重定向到一个新的位置
header('Location: http://www.example.org/');
// 延迟一段时间后重定向
header('Refresh: 10; url=http://www.example.org/');
print 'You will be redirected in 10 seconds';
// 也可以使用HTML语法来实现延迟
// zip"');
header('Content-Transfer-Encoding: binary');
// 加载要下载的文件:
readfile('example.zip');
// 禁止缓存当前文档:&n
相关文档:
1.
$query = $this->db->query('SELECT name, title, email from my_table');
foreach ($query->result() as $row)
{
echo $row->title;
echo $row->name;
echo $row->email;
}
2.
foreach ($query->result_array() as $row)
{ ......
注意:之前我在网上找了好多的资料 NND都不能正常配置成功 搞得我是非常地郁闷!
找到这篇文章之后我终于配置成功了!哇好爽呀!只要按照 上面的步骤就一定能够成功的!
此文章的安装方法适用于Windows XP下的Apache+PHP+MySQL安装,同时也适用于Windows 2003系统下的安装和配置。
1. 安装环境
操作系统是 Window ......
<?
require ("config.php3");
?>
<?
if($submit)
{
//echo $action;
//if($action=='update') &nb ......