-
PHP生成静态页面完整教程步骤
[PHP教程] 2022-07-07 13:25:16 157人阅读
我们先回顾一些基本的概念。 一、PHP脚本与动态页面。 PHP脚本是一种服务器端脚本程序,可通过嵌入等方法与HTML文件混合,也可以类,函数封装等形式,以模板的方式对用户请求进行处理。无论以何种方式,它的基本原理...[详细]
-
smarty更改php模板教程
[PHP教程] 2022-07-07 13:24:29 121人阅读
smarty,最得名,用之,配置语法都是菜鸟级别的,没的说,先列一点我使用的: {foreach key=key item=MMSPAN from=TSortUrl} td align=left valign=bottom height=25 {if mysort eq key} img src=images/sort_{key}_...[详细]
-
PHP操作文件类实例代码分享
[PHP教程] 2022-07-07 13:23:49 200人阅读
发一个刚写完的文件操作类 第一次写类,写的不好,大家多提意见,不过不要骂我 刚才又加了两个功能,又加了注释,高手一定帮我看看哪有问题啊,谢谢 file.class.php ?php /** *本类为文件操作类,实现了文件的建立,...[详细]
-
PHP实现上传文件自动生成缩略图加文字例子代码
[PHP教程] 2022-07-07 13:23:17 54人阅读
? //自动缩图srcFile原文件,大图;photo_small目标文件,小图;dstW,dstH是小图的宽,高。 function makethumb(srcFile,photo_small,dstW,dstH) { data = GetImageSize(srcFile); switch (data[2]) { case 1: //图片...[详细]
-
PHP实例PHP实现定时生成HTML网站首页介绍
[PHP教程] 2022-07-07 13:22:47 119人阅读
为了提高网站的访问速度,我们往往采用生成静态的方式来实现,这样确实把网站的访问速度提高了很多.但定时生成就受到了一些局限性,大家如果有独立服务器的可以在服务器上设置计划任务,但如果是使用虚拟主机的可就不好...[详细]
-
PHP多文件上传的实例代码推荐
[PHP教程] 2022-07-07 13:22:09 138人阅读
PHP多文件上传的实例代码 upload_html.php HTML HEAD TITLE上传文件/TITLE /HEAD script function beforesubmit(forma) { var indexnamea=forma.indexname.value; var upfilea=forma.upfile.value; var k=/ /g; var ...[详细]
-
新手PHP指导php.ini 配置详细选项
[PHP教程] 2022-07-07 13:21:38 121人阅读
php.ini 或 php3.ini 是 PHP 在启动时会读取的配置文件。该文件的存放路径为 /usr/local/lib/。在 PHP 3.x 版的配置文件为 php3.ini;而在 PHP 4.x 版改为 php.ini。若 PHP 安装成服务器的模块,则在 Web 服务器启动...[详细]
-
PHP安全编程之加密功能详细介绍
[PHP教程] 2022-07-07 13:20:37 96人阅读
数据加密在我们生活中的地位已经越来越重要了,尤其是考虑到在网络上发生的大量交易和传输的大量数据。如果对于采用安全措施有兴趣的话,也一定会有兴趣了解PHP提供的一系列安全功能。在本篇文章中,我们将介绍这些...[详细]
-
PHP天气查询示例代码
[PHP教程] 2022-07-07 13:20:11 147人阅读
?php city_name=_GET[city]; //用正则在city.txt中查找相应城市的天气城市代码 city_name=trim(ereg_replace([ ]{1,},,city_name)); time_file=city.txt; city_all=file_get_contents(time_file); preg=|city_name,(...[详细]
-
PHP 验证码 详细代码带注释 分享!
[PHP教程] 2022-07-07 13:19:26 141人阅读
checkcode.php 生成验证码图片,还有变量 $_SESSION[check_pic]。 ? session_start(); for($i=0; $i4; $i++){ $rand.= dechex(rand(1,15)); } $_SESSION[check_pic]=$rand; //echo $_SESSION[check_pic]; // 设置图...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]