#!/usr/bin/env php replaceImageURL(); cid=0 - 图片链接为 {1.png} @ - 图片链接为 data/upload @ - 图片链接为 /file-read-1.png @ */ include dirname(__FILE__, 5) . '/test/lib/init.php'; su('admin'); global $tester; $mailModel = $tester->loadModel('mail'); $mailModel->app->user->account = 'admin'; $mailModel->config->requestType = 'PATH_INFO'; $mailModel->config->webRoot = '/'; $mailModel->config->mail->domain = 'http://pms.zentao.net'; $body1 = ''; $body2 = ''; $body3 = ''; r($mailModel->replaceImageURL($body1, array())) && p() && e(''); //图片链接为 {1.png} r($mailModel->replaceImageURL($body2, array())) && p() && e(''); //图片链接为 data/upload r($mailModel->replaceImageURL($body3, array())) && p() && e(''); //图片链接为 /file-read-1.png