-
使用PHP实现浏览器点击下载TXT文档的方法详解
[PHP教程] 2022-07-12 12:48:04 89人阅读
由于现在的浏览器已经可以识别txt文档格式,如果只给txt文档做一个文字链接的话,点击后只是打开一个新窗口显示txt文件的内容,并不能实现点击下载的目的。 当然这个问题的解决办法也可以是将txt文件改名为浏览器不...[详细]
-
基于php下载文件的详情
[PHP教程] 2022-07-12 12:47:21 85人阅读
php下载文件,比如txt文件。 出现的效果就是,弹出浏览器自带的下载框,出现另存为操作。有时候会出现内存溢出和超时的现象。 超时的话,设置set_time_limit(0); 出现内存溢出的话,有可能是因为从数据库中取出的数...[详细]
-
深入php数据采集的详情
[PHP教程] 2022-07-12 12:46:03 126人阅读
这里介绍两个php采集能用到的好工具。一个是Snoopy,一个是simple_html_dom。采集还有很多方式(其实本质就2-3种,其他的都是衍生的),php自带了几个方法也能直接进行采集。但是,出于把懒惰进行到底的精神。我们还...[详细]
-
深入PHP操作MongoDB的技术汇总
[PHP教程] 2022-07-12 12:44:59 100人阅读
复制代码 代码如下:www.CuoXIn.com ?php /** * PHP操作MongoDB学习笔记 */ //************************* //** 连接MongoDB数据库 **// //************************* //格式=(mongodb://用户名:密码 @地址:端口/默认...[详细]
-
phpcms问答某模块存储型xss详情
[PHP教程] 2022-07-12 12:43:46 156人阅读
黑名单惹的祸啊 在回帖处,有个编辑器功能。 编辑器存在一个可以编辑源码,当时第一反映就是。这里肯定存在xss。 别着急。 在http://html5sec.org/里,还是有不少可以使用的代码。譬如: input onfocus=alert(1) aut...[详细]
-
PHP文件上传代码用法介绍
[PHP教程] 2022-07-12 12:42:59 122人阅读
在php中上传文件必须知道的几个东西 $_FILES[myfile][name] 是指被上传文件的名称 $_FILES[myfile][type] 是指被上传文件的类型 $_FILES[myfile][size] 是指被上传文件的大小,单位为字节(B) $_FILES[myfile][tmp_na...[详细]
-
php预防sql注入的函数介绍
[PHP教程] 2022-07-12 12:42:27 65人阅读
具体用法 addslashes防止SQL注入 虽然国内很多PHP程序员仍在依靠addslashes防止SQL注入,还是建议大家加强中文防止SQL注入的检查。addslashes的问题在 于黑客 可以用0xbf27来代替单引号,而addslashes只是将0xbf27修...[详细]
-
怎么使用php解析xml文件
[PHP教程] 2022-07-12 12:41:14 65人阅读
DOMElement DOMElement DOMDocument::createElement ( string $name [, string $value ] ) 创建节点元素 String $name:节点名 String $value:节点的值 添加节点 DOMNode DOMNode::appendChild ( DOMNode $newnode ...[详细]
-
教你如何批量替换相对地址为绝对地址利用bat批
[PHP教程] 2022-07-12 12:40:21 92人阅读
如果你的url链接是相对路径static/mapi.css,你想把他批量替换成绝对路径http://dev.baidu.com/wiki/static/map/cloud/static/mapi.css。那么,你可以这样做: 写一个PHP文件,把需要替换的网址写进去。 这个代码的...[详细]
-
php源代码安装常见错误与解决办法共享
[PHP教程] 2022-07-12 12:35:40 81人阅读
错误:configure: error: cannot find output from lex; giving up 解决:yum -y install flex 错误:configure: error: mod_deflate has been requested but can not be built due to prerequisite failures 解决:...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]