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

PHP中的魔术方法

PHP中有下列称之为魔术方法(magic method)的函数:__construct, __destruct ,
__call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup,
__toString, __set_state, __clone and __autoload,本文使用__call为实现一个身份验证的简单实例,代码如下: 代码<?php
    interface Accountable
    {
        const ERR_MSG = "error";
        public function isLoggedIn();
        public function getAccount($user = '');
    }
    abstract class Authentication implements Accountable
    {
        private $account = null;
        public function getAccount($user = '')
        {
            if ($this->account != null) {
                return $this->account;
            } else {
                return ERR_MSG;
            }
        }
        public function isLoggedIn()
        {
            return ($this->account != null);
        }
    }
    class 


相关文档:

PHP函数(2)

in_array(value,array,type)        //检查一个值是否在数组中,type可选,设置为true检查类型是否相同,分大小写
例:
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo "Got Irix"; ......

ubuntu下eclipse安装PDT(php development toolkit)


感谢作者,文章来源
http://www.csask.com/blog/?p=108
eclipse是我非常喜欢的IDE,开源+免费+功能强大+跨平台+跨语言+插件机制,虽然有时候也会有这样那样的问题,但是作为主力开发IDE,eclipse已经非常足够了。
第1步,安装JRE:
sudo apt-get install sun-java6-jre
第2步,下载eclipse:
http://www.eclipse.or ......

php下载文件代码

一般的文件安全下载方法可以使用下面的代码:
1. <?php?
2.
3. $durl = 'file/phpcms2008_o2abf32efj883c91a.iso';
4. $filename = 'phpcms2008_o2abf32efj883c91a.iso';
5. $file = @fopen($durl, 'r');
6. header("Content-Type: application/octet-stream");
......

php 柱状图

<?php
//״ͼ
//http://www.codefans.net
//
function createImage($data,$twidth,$tspace,$height){
                        $dataName = array();
    &nb ......

PHP 无限分类

<?php
//作者:梁文平 http://www.tyasp.net
session_start();
if($_SESSION["username"]!="admin")
{
echo("<mce:script type="text/javascript"><!--
alert("操作超时!请重新登陆...");window.location.href="../index.php";
// --></mce:script>");
//header("refresh:0;url=../"); ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号