易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP header() examples 完整代码


/*** Function: PHP header() examples (PHP)
**
Desc: Some examples on how to use the header() function of PHPYou find
a detailed tutorial at expertsrt.com (English) or at ffm.junetz.de
(German).These is also a good help about caching at web-caching.com.
**
Example: see below.
<br/><br/><b>Tip:</b>
You can use these sites to check your headers: <a
href="http://web-sniffer.net/">web-sniffer.net</a>,
<a
href="http://www.delorie.com/web/headers.html">delorie.com</a>
or <a
href="http://www.forret.com/projects/analyze/">www.forret.com</a>.
** Author: Jonas John
*/
// fix 404 pages:
header('HTTP/1.1 200 OK');
// set 404 header:
header('HTTP/1.1 404 Not Found');
// set Moved Permanently header (good for redrictions)
// use with location header
header('HTTP/1.1 301 Moved Permanently');
// redirect to a new location:
header('Location: http://www.example.org/');
// redrict with delay:
header('Refresh: 10; url=http://www.example.org/');
print 'You will be redirected in 10 seconds';
// you could also use the HTML syntax:// <meta http-equiv="refresh" content="10;http://www.example.org/ />
// override X-Powered-By: PHP:
header('X-Powered-By: PHP/4.4.0');
header('X-Powered-By: Brain/0.6b');
// content language (en = English)
header('Content-language: en');
// last modified (good for caching)
$time = time() – 60; // or filemtime($fn), etc
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $time).' GMT');
// header for telling the browser that the content
// did not get changed
header('HTTP/1.1 304 Not Modified');
// set content length (good for caching):
header('Content-Length: 1234');
// Headers for an download:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="example.zip"');


相关文档:

fedora下php环境.txt

安装mysql
==================
1.yum install mysql*
2.启动:/sbin/service mysqld start
安装php
=================
1.yum install php
2.查看php安装目录:whereis php
安装lighttpd
=================
1.yum install lighttpd
2.yum search lighttpd(检测lighttpd没有被安装的依赖包)
3.yum install lighttpd ......

PHP下载CSS文件中的图片

作为一个资深并且专业的扒皮人员,在我从初三开始投入伟大的互联网中到现在积累了丰富的扒皮经验。我相信每个做web的程序员也都会有类似的经历。
在扒皮过程中,必不可少的需要下载样式文件中的图片。碰到比较庞大的样式文件,其中可能会有上百个需要下载的图片,那么使用下面这段小代码是最为合
适的了。
< ?php
/* ......

PHP 生成随机数

function randomkeys($length)
{
 $key='';
 $pattern='123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
 for($i=0;$i<$length;$i++)
 {
   $key .= $pattern{mt_rand(0,47)}; 
       
  }
   ......

几种常用PHP连接数据库的代码

PHP连接数据库之PHP连接MYSQL数据库代码 < ?php   
$mysql_server_name='localhost'; 
//改成自己的mysql数据库服务器  
$mysql_username='root'; 
//改成自己的mysql数据库用户名  
$mysql_password='12345678'; 
//改成自己的mysql数据库密码 &nb ......

PHP发送邮件 phpmailer

最近弄PHP邮件发送时,从网上载了段代码,总是有些问题,所以对这些问题的解决作一个记录,方便以后查阅。
PHP发送邮件:
1、class.phpmailer.php 类包的官网下载最新版的phpmailer类,要注册的哦。
2、注意看你的发送邮箱是不是开通的SMTP服务。登录邮箱 -> 设置, 查看是否支持SMTP或是否开启。
3、问题:it is no ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号