當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WT_Filter::escapeUrl方法代碼示例

本文整理匯總了PHP中WT_Filter::escapeUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP WT_Filter::escapeUrl方法的具體用法?PHP WT_Filter::escapeUrl怎麽用?PHP WT_Filter::escapeUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WT_Filter的用法示例。


在下文中一共展示了WT_Filter::escapeUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: unset

        unset($xrefs[$old_xref]);
        WT_DB::exec("UNLOCK TABLES");
        WT_DB::exec("COMMIT");
        try {
            WT_DB::prepare("UPDATE `##favorite` SET xref = ? WHERE xref = ? AND gedcom_id = ?")->execute(array($new_xref, $old_xref, WT_GED_ID));
        } catch (Exception $ex) {
            // Perhaps the favorites module was not installed?
        }
        // How much time do we have left?
        if (microtime(true) - $start_time > ini_get('max_execution_time') - 5) {
            echo '<p>', WT_I18N::translate('The server’s time limit was reached.'), '</p>';
            break;
        }
    }
    if ($xrefs) {
    }
} else {
    echo '<p>', WT_I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or "R14".'), '</p>';
    echo '<p>', WT_I18N::translate('You can renumber a family tree so that these reference numbers are unique across all family trees.'), '</p>';
}
echo '<p>', WT_I18N::plural('This family tree has %s record which uses the same “XREF” as another family tree.', 'This family tree has %s records which use the same “XREF” as another family tree.', count($xrefs), count($xrefs)), '</p>';
if ($xrefs) {
    // We use GET (not POST) for this update operation - because we want the user to
    // be able to press F5 to continue after a timeout.
    echo '<form method="GET" action="', WT_SCRIPT_NAME, '">';
    echo '<p>', WT_I18N::translate('You can renumber this family tree.');
    echo '<input type="submit" name="go" value="', WT_I18N::translate('go'), '"></p>';
    echo '<input type="hidden" name="ged" value="', WT_Filter::escapeUrl(WT_GEDCOM), '">';
    echo '</form>';
    echo '<p>', WT_I18N::translate('Caution!  This may take a long time.  Be patient.'), '</p>';
}
開發者ID:brambravo,項目名稱:webtrees,代碼行數:31,代碼來源:admin_trees_renumber.php


注:本文中的WT_Filter::escapeUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。