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

推荐订阅源

The Last Watchdog
The Last Watchdog
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
小众软件
小众软件
雷峰网
雷峰网
F
Full Disclosure
B
Blog
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
月光博客
月光博客
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
TaoSecurity Blog
TaoSecurity Blog
博客园 - 聂微东
P
Palo Alto Networks Blog
N
Netflix TechBlog - Medium
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
P
Privacy & Cybersecurity Law Blog
U
Unit 42
Cloudbric
Cloudbric
Know Your Adversary
Know Your Adversary
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
T
Tailwind CSS Blog
S
Schneier on Security
IT之家
IT之家
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tenable Blog
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
Cyberwarzone
Cyberwarzone
P
Privacy International News Feed
I
InfoQ
MongoDB | Blog
MongoDB | Blog
Project Zero
Project Zero
B
Blog RSS Feed
Help Net Security
Help Net Security
H
Heimdal Security Blog
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
V
V2EX
C
CXSECURITY Database RSS Feed - CXSecurity.com
J
Java Code Geeks

博客园 - 涂文瀚

常用的前端调试工具 用户中心 - 博客园 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