-
PHP Memcache 详解和简单应用
[PHP教程] 2022-02-15 16:07:07 195人阅读
简介:memcached是一个高性能的、分布式内存对象缓存系统,通常被用于降低数据库教程加载压力以提高动态web应用的响应速度. 此扩展使用了libmemcached库提供的api与memcached服务端进行交互,它同样提供了一个session处...[详细]
-
php HTTP REFERER模仿代码
[PHP教程] 2022-02-15 16:06:34 137人阅读
?php if (!isset($_server[http_referer])) echo no referer; else echo $_server[http_referer]; ? 如果直接点击上面的链接,那么页面会显示referer页面的链接.代码如下: set http = createobject(msxml2.xmlhttp) h...[详细]
-
php web系统多域名登录失败解决办法
[PHP教程] 2022-02-15 16:06:04 95人阅读
下面只是简单的逻辑结构,对于正式的系统需要做具体的处理. 这里需要注意的是:加解密一定需要做安全验证,但是这个方法也不够完美,两个站点必须有相同一级域名,另外这种完全基于cookie的方式,安全性不够高,代码如下: f...[详细]
-
php生成word两种办法
[PHP教程] 2022-02-15 16:05:26 126人阅读
1.正常的touch创建word 2.fopen 打开word 3.fwrite 写入word 并保存 这样会出现一个问题,如果写入的东西里面含有html代码的话,它将直接写入word而不是 排版了. 这个问题,需要在输出html代码头部加一段代码: $headert...[详细]
-
php数组 类和对象 接口使用办法
[PHP教程] 2022-02-15 16:04:58 67人阅读
1. 数组 php的数组其实是一个关联数组,或者说是哈希表,php不需要预先声明数组的大小,可以用直接赋值的方式来创建数组,例如: //最传统,用数字做键,赋值 $state[0]=beijing; $state[1]=hebei; $state[2]=tianjin; //如...[详细]
-
php里缓冲输出实例代码
[PHP教程] 2022-02-15 16:04:37 126人阅读
ob_start([string output_callback])- 打开输出缓冲区 所有的输出信息不在直接发送到浏览器,而是保存在输出缓冲区里面,可选得回调函数用于处理输出结果信息. ob_end_flush - 结束(发送)输出缓冲区的内容,关闭输出...[详细]
-
php里fsockopen详细实例代码
[PHP教程] 2022-02-15 16:04:07 166人阅读
$fp=fsockopen(127.0.0.1,80); //打开数据流 if(!$fp) //如果打开出错 { echo unable to openn; //输出内容 } else //如果成功打开 { fwrite($fp,get / http/1.0rnrn); //向数据流写入内容 stream_set_timeout($fp,2...[详细]
-
php Socket 创建 监听等示例
[PHP教程] 2022-02-15 16:03:40 186人阅读
本文章提供在php中socket相关函数的实例,如果创建Socket 接受一个socket连接 写入一个Socket 初始化连接等操作,实例代码如下: $ip=127.0.0.1; //定义ip地址 $port=1000; //定义端口 $socket=socket_create(af_inet,s...[详细]
-
php 源于表单密码验证与HTTP验证用法
[PHP教程] 2022-02-15 16:01:58 122人阅读
PHP 的 HTTP 认证机制仅在 PHP 以 Apache 模块方式运行时才有效,因此该功能不适用于 CGI 版本。在 Apache 模块的 PHP 脚本中,可以用 header() 函数来向客户端浏览器发送Authentication Required信息,使其弹出一个...[详细]
-
phpmyadmin不需要密码登录的设定方法
[PHP教程] 2022-02-15 16:01:35 92人阅读
下了最新版的phpmyadmin,装上后输入用户名root然后点登录,因为我在本地,所以root没有密码,结果老是报访问被拒绝的错误. 看了下权限的设置没什么问题呀,网上也没找到好的答案,与是根踪代码,原来在配置文件config.defa...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]