本文整理匯總了PHP中Build::GetUploadedFilesOrUrls方法的典型用法代碼示例。如果您正苦於以下問題:PHP Build::GetUploadedFilesOrUrls方法的具體用法?PHP Build::GetUploadedFilesOrUrls怎麽用?PHP Build::GetUploadedFilesOrUrls使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Build
的用法示例。
在下文中一共展示了Build::GetUploadedFilesOrUrls方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
$xml = begin_XML_for_XSLT();
$xml .= get_cdash_dashboard_xml(get_project_name($projectid), $date);
$db = pdo_connect("{$CDASH_DB_HOST}", "{$CDASH_DB_LOGIN}", "{$CDASH_DB_PASS}");
pdo_select_db("{$CDASH_DB_NAME}", $db);
$xml .= add_XML_value("title", "CDash - Uploaded files");
$xml .= add_XML_value("menutitle", "CDash");
$xml .= add_XML_value("menusubtitle", "Uploaded files");
$xml .= "<hostname>" . $_SERVER['SERVER_NAME'] . "</hostname>";
$xml .= "<date>" . date("r") . "</date>";
$xml .= "<backurl>index.php</backurl>";
$xml .= "<buildid>{$buildid}</buildid>";
$xml .= '<buildname>' . $Build->Name . '</buildname>';
$xml .= '<buildstarttime>' . $Build->StartTime . '</buildstarttime>';
$xml .= '<siteid>' . $Site->Id . '</siteid>';
$xml .= '<sitename>' . $Site->GetName() . '</sitename>';
$uploadFilesOrURLs = $Build->GetUploadedFilesOrUrls();
foreach ($uploadFilesOrURLs as $uploadFileOrURL) {
if (!$uploadFileOrURL->IsUrl) {
$xml .= '<uploadfile>';
$xml .= '<id>' . $uploadFileOrURL->Id . '</id>';
$xml .= '<href>' . $CDASH_DOWNLOAD_RELATIVE_URL . '/' . $uploadFileOrURL->Sha1Sum . '/' . $uploadFileOrURL->Filename . '</href>';
$xml .= '<sha1sum>' . $uploadFileOrURL->Sha1Sum . '</sha1sum>';
$xml .= '<filename>' . $uploadFileOrURL->Filename . '</filename>';
$xml .= '<filesize>' . $uploadFileOrURL->Filesize . '</filesize>';
$filesize = $uploadFileOrURL->Filesize;
$ext = "b";
if ($filesize > 1024) {
$filesize /= 1024;
$ext = "Kb";
}
if ($filesize > 1024) {