本文整理汇总了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) {