• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 采用SimpleTest進行PHP單元測試

    發表于:2009-12-24來源:作者:點擊數: 標簽:
    采用SimpleTest進行 PHP 單元測試 單元測試工具 SimpleTest : http://simpletest.org/index.html 文件操作類 file.class.php class File { var $filename; function File($file) { if (emptyempty($file)) { die('Filename should not be empty'); } $this-f

      采用SimpleTest進行PHP單元測試  單元測試工具 

        SimpleTest : http://simpletest.org/index.html

      文件操作類 file.class.php

      

      class File

      {

      var $filename;

      function File($file)

      {

      if (emptyempty($file)) {

      die('Filename should not be empty');

      }

      $this->filename = $file;

      if (!$this->exists() && !$this->create()) die('Unable to find / create the file');

      }

      function exists()

      {

      return file_exists($this->filename);

      }

      function create()

      {

      if ($this->exists()) return true;

      return $this->putContents(null);

      }

      function getContents()

      {

      return @file_get_contents($this->filename);

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>