惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
GRAHAM CLULEY
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Proofpoint News Feed
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
Project Zero
Project Zero
H
Help Net Security
B
Blog RSS Feed
T
Threatpost
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
博客园 - 【当耐特】
月光博客
月光博客
Google Online Security Blog
Google Online Security Blog
NISL@THU
NISL@THU
The GitHub Blog
The GitHub Blog
P
Privacy & Cybersecurity Law Blog
N
News | PayPal Newsroom
T
Tenable Blog
Simon Willison's Weblog
Simon Willison's Weblog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
小众软件
小众软件
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Jina AI
Jina AI
J
Java Code Geeks
Recent Announcements
Recent Announcements
TaoSecurity Blog
TaoSecurity Blog
MongoDB | Blog
MongoDB | Blog
T
Troy Hunt's Blog
V
Visual Studio Blog
博客园_首页
L
LangChain Blog
SecWiki News
SecWiki News
O
OpenAI News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
A
Arctic Wolf
U
Unit 42

博客园 - 涂文瀚

常用的前端调试工具 用户中心 - 博客园 SQL中动态进行行转列 SQL SERVER 表分区实施步奏 [记录]SQL SERVER 跨库操作小记 PHP常见面试问题 在WIN下搭建PHP的测试、开发环境 [转]三款免费的PHP加速器:APC eAccelerator XCache比较 Xdebug如何选择PHP版本 PHP Cookbook读书笔记 – 第01章字符串 PHP Cookbook读书笔记 – 第03章日期和时间 PHP Cookbook读书笔记 – 第02章数字 PHP Cookbook读书笔记 – 第04章数组 PHP Cookbook读书笔记 – 第06章函数 PHP Cookbook读书笔记 – 第07章类和对象 设计模式之观察者模式 PHP Cookbook读书笔记 – 第09章表单 PHP Cookbook读书笔记 – 第11章Session和持久化 PHP Cookbook读书笔记 – 第12章XML
PHP Cookbook读书笔记 – 第08章web基础
涂文瀚 · 2011-12-15 · via 博客园 - 涂文瀚

本章主要介绍了和web相关的一些基础知识如cookie、get请求、post请求、环境变量的读写等内容。

setcookie() : 设置cookie值

$_COOKIE['名']:获得cookie值

浏览器重定向:header('Location: http://www.example.com/confirm.html');

get_browser() : 获得浏览器参数
http_build_query() : 将数组转换成查询字符串

$vars = array('name' => 'Oscar the Grouch',
              'color' => 'green',
              'favorite_punctuation' => '#');
$query_string = http_build_query($vars);
$url = '/muppet/select.php?' . $query_string;

结果是:/muppet/select.php?name=Oscar+the+Grouch&color=green&favorite_punctuation=%23

php://input:由来获取post过来的原始数据,用的应该比较少

$_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']:HTTP验证,几乎用不上

flush() : 将当前为止程序的所有输出发送到用户的浏览器

ob_start() : 打开输出缓冲,所有输出将不会立刻发送

ob_end_flush() : 关闭输出缓冲,并将所有输出发送到用户浏览器

getenv() : 得到环境变量

putenv() : 设置环境变量

http://www.cnblogs.com/Excellent