setNginxSecret($secret); $this->setUserIp($userIp); if (!empty($pattern)) { $this->setNginxSecureLinkMd5Pattern($pattern); } echo "\n"; echo "==function secureLink==\n"; echo "secret: {$secret}\n"; echo "user ip: {$userIp}\n"; $url = $this->getSecureLink($path); echo "secure link: {$url}\n"; echo "\n"; } } //--调用测试方法-- $scanner = new DirScannerTest(); $scanner->secureLinkTest('/default/');