-
动态网页里直接不让访问PHP程序文件
[PHP教程] 2022-03-01 16:07:22 198人阅读
由于我们有需要用到某些php文件,而又不希望别人直接访问这个文件,我们可以在其他包含文件比如global.php中定义一个参数,在被访问页面data.php前面判断是否定义了该参数,没有定义则禁止访问。 在global.php中定义 以...[详细]
-
网页实例 详细介绍拿PHP来编写网页记数器
[PHP教程] 2022-03-01 16:06:36 72人阅读
本款计数器用文本计数。没有用到数据库,可以实现如下功能: 利用一个文本文件实现多个页的计数减少服务器的I/O占用率在需要纪录的文件里,只需加入很少的几行代码 基本思路如下: 服务器程序从文本文件中读取该页被...[详细]
-
动态网页PHP里引用
[PHP教程] 2022-03-01 16:01:51 169人阅读
之前一个朋友的帖子提到过这方面的疑问,这里简单整理一下,希望能让更多新学php的朋友得到帮助。 php的引用(就是在变量或者函数、对象等前面加上符号)是个高级话题,新手多注意,正确的理解php的引用很重要,对性...[详细]
-
让我们来编写一些PHP有用的脚本
[PHP教程] 2022-03-01 16:01:12 142人阅读
现在让我们来编写一些更实用的脚本。我们将检查浏览页面的访问者用了什么类型的浏览器。要达到这个目的,我们需要检查用户的 agent 字符串,它是浏览器发送的 HTTP 请求的一部分。该信息被存储在一个变量中。在 PHP ...[详细]
-
解答 怎样使用PHP开发高效的WEB系统
[PHP教程] 2022-03-01 16:00:42 192人阅读
PHP是一个很优秀的工具,它可以简单,也可以复杂。不一样的项目,应该用不一样的PHP。 小项目 - 简单而直接的PHP 一般对于一个功能页面在20以下的网站,我们可以用一个很简单的框架结构来写。在这个规模上,我建议是...[详细]
-
拿Suhosin加强PHP脚本语言安全性
[PHP教程] 2022-03-01 16:00:05 166人阅读
PHP是一种非常流行的网站脚本语言,但是它本身所固有的安全性是非常薄弱。本文讲述了PHP增强计划(Hardened-PHP project)和新的Suhosi计划,Suhosin提供了增强的PHP的安全配置。 PHP是带有争论地但又是最流行的一种...[详细]
-
PHP 5.0对象模型深度探寻之类的静态成员
[PHP教程] 2022-03-01 15:53:45 123人阅读
类的静态成员与一般的类成员不同: 静态成员与对象的实例无关,只与类本身有关。他们用来实现类要封装的功能和数据,但不包括特定对象的功能和数据,静态成员包括静态方法和静态属性。 静态属性包含在类中要封装的数...[详细]
-
给PHP管理小型的邮件列表
[PHP教程] 2022-03-01 15:53:25 89人阅读
近有一个读者问我关于ThickBook新闻列表中处理订阅/退订的机制,并且是如何与实际的发送信息相配合,给邮件列表中的所有收信人的。问题提的不错,有一个相当容易的方法,但是我首先要说的是我所做的没有任何投机取巧...[详细]
-
实例 用PHP技术处理网站URL格式过长的问题
[PHP教程] 2022-03-01 15:52:41 106人阅读
最近正在帮朋友开发一个全新的网站,设计初衷是简洁、易于访问。结果,由于不是十分上心,对部分设计并不是很满意。比如,网站导航、评论和社区部分仍有待完善。但是,在开发过程中总结出一些PHP应用技巧,愿与大家...[详细]
-
php中计算时间差的几种办法
[PHP教程] 2022-03-01 15:51:46 70人阅读
在php中计算时间差有时候是件麻烦的事!不过只要你掌握了日期时间函数的用法那这些也就变的简单了: 一个简单的例子就是计算借书的天数,这需要php根据每天的日期进行计算,下面就来谈谈实现这种日期计算的几种方法: (1...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]