public function testIndex() { $_SERVER = array(); $_SERVER['SERVER_NAME'] = "news.cz001.com.cn"; $_REQUEST = array(); $_REQUEST['object'] = "2016-01/02/content_3194516.htm"; $oos_web = new OSSWeb(); $oos_web->index(); }
<?php /** * Created by PhpStorm. * User: hefish * Date: 2016/1/4 * Time: 23:51 */ require_once "config.php"; $o = new OSSWeb(); $o->index();