易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP数据结构——线性表的删除

function delete_array_element($arr,$i) {
$len = count($arr);
for($j=$i; $j<$len; $j++) {
$arr[$j] = $arr[$j+1];
}
array_pop($arr);//将数组的最后一个单元弹出
return $arr;
}
for($i=0; $i<10; $i++) {
$arr1[$i] = $i+1;
}
print_r($arr1);
echo "<br>";
print_r(delete_array_element($arr1,5));
输出结构:
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 )
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 7 [6] => 8 [7] => 9 [8] => 10 )


相关文档:

PHP各种Template系统


搜集不全,链接没有全部测试,大部分可用
Easy Template System
http://ets.sourceforge.net/
http://ets.sourceforge.net/ets.pdf
http://prdownloads.sourceforge.net/ets/ets305b.zip?download
Smarty
http://smarty.php.net/
FastTemplate
http://www.thewebmasters.net/php/FastTemplate.phtml
http://www ......

【转】 php中require注意事项

【转自】:http://blog.miaoheguang.tk/archives/11
被PHP的include路径弄晕了。自己试验一通,总结如下。
定义A=包含文件 B=被A包含的文件 C=被B包含的文件
也就是说 A 包含 B, B包含C
A中有
Php 代码
require ‘[B路径]‘ //(这里 的require可以换成require_once include)
require ‘[B路径]&l ......

PHP 序列化(serialize)格式详解

PHP 序列化(serialize)格式详解
前言
概述
NULL 和标量类型的序列化
简单复合类型的序列化
嵌套复合类型的序列化
自定义对象序列化
Unicode 字符串的序列化
参考文献
1.前言
PHP (从 PHP 3.05 开始)为保存对象提供了一组序列化和反序列化的函数:serialize、unserialize。不过在
PHP 手册中对这两个函数的 ......

PHP 判断是否低俗图片==是否@色@情@图@片

if(validatorImage("d:\b.jpg"))
echo '是个低俗图片<br />';
else
echo '不是低俗图片<br />';
function validatorImage($fileName){
$image = getImage($fileName);
$width = ImagesX($image);
$height = ImagesY($image);
$ycb = 0;
for($y=0;$y<$height;$y++){
for($x=0;$x<$widt ......

PHP的日期时间运算总结




<?php
//GB2312的Encode
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
/*重点了解strtotime()函数
1、strftime比time()好用,可以直接把常用的’2010-02-03‘转成时间戳。
2、date( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号