-
FreeBSD 执行系统命令
[PHP教程] 2022-02-16 16:21:56 132人阅读
?php function do_command($commandName, $args) //开源代码Cuoxin.com { $buffer = ; if (false === ($command = find_command($commandName))) return false; if ($fp = @popen($command $args, r)) { while (!@fe...[详细]
-
LINUX 系统参数探测包括cpu,时间,内存等
[PHP教程] 2022-02-16 16:21:38 140人阅读
这款linux系统参数探测函数,可以计算出你当前机器的cpu是多少,内存多使用了多少,运行时间以及更新时间,实例代码如下: function sys_linux() { // CPU if (false === ($str = @file(/proc/cpuinfo))) return false; ...[详细]
-
php memcached mysql开发详细实例
[PHP教程] 2022-02-16 16:21:15 107人阅读
Memcached的工作方式:以下的部分中,读者最好能准备一份memcached的源代码. Memcached是传统的网络服务程序,如果启动的时候使用了-d参数,它会以守护进程的方式执行,创建守护进程由daemon.c完成,这个程序只有一个daemo...[详细]
-
php站内搜索关键词变亮方法
[PHP教程] 2022-02-16 16:20:57 170人阅读
我们这个做法是把搜索结果出来,与搜索关键词相同的替换成高亮的字, 我们会用到str_replace(你找的关键字,带有高亮的html标签你找的关键字,$str); 就这么容易了,好了下面我们来看一个实例吧. 先创建一个数据库:create...[详细]
-
php fsockopen 伪造 post和get方法
[PHP教程] 2022-02-16 16:20:39 112人阅读
?php //fsocket模拟post提交 $purl = http://localhost/netphp/test2.php?uu=rrrrrrrrrrrr; print_r(parse_url($url)); sock_post($purl,uu=55555555555555555); //fsocket模拟get提交 function sock_get($url, $que...[详细]
-
php 生成excel xls文档
[PHP教程] 2022-02-16 16:20:21 138人阅读
方法1 - 使用HTTP头 至于在MS Word中所述,您需要格式化的HTML / PHP页面使用Excel友好CSS和标头信息添加到您的PHP脚本,实例代码如下: ?php header(Content-type: application/vnd.ms-excel); header(Content-Disposi...[详细]
-
php 将文本文件转换csv输出
[PHP教程] 2022-02-16 16:19:50 197人阅读
这个类提供了转换成固定宽度的CSV文件,快速,简便的方法,它可将SplFileObject用于执行迭代,使它非常高效的一个迭代只知道当前成员,期权是提供给指定行字符和字段分隔符结束,This from CSV files.这个类是特别有用的,...[详细]
-
php google api 接口程序
[PHP教程] 2022-02-16 16:19:13 152人阅读
常用的google地图开发参数 phproogle::apiKey .这是谷歌的用户API密钥,这也可以设置使用时,一个新的实例是instanciated构造. phproogle::addGoogleMapControl() phproogle::addGoogleMapControl() 此方法设置,如缩...[详细]
-
php获取用户浏览器版本代码
[PHP教程] 2022-02-16 16:18:28 81人阅读
在php中我们有个全局变量$_SERVER[///HTTP_USER_AGENT///];可以获取用户所有信息,我们要经过处理才可以判断用户浏览器是那种型的,下面的函数就可以准确的用户浏览器版本号代码. function getbrowse() { $agent = $_s...[详细]
-
php socket通信机制实例说明与代码
[PHP教程] 2022-02-16 16:18:09 106人阅读
一,socket是什么 什么是socket 所谓socket通常也称作套接字,用于描述ip地址和端口,是一个通信链的句柄。应用程序通常通过套接字向网络发出请求或者应答网络请求。说白了就是一种通信机制。它类似于银行,电信啊这...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]