本文整理汇总了PHP中UrlManager::udpate方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlManager::udpate方法的具体用法?PHP UrlManager::udpate怎么用?PHP UrlManager::udpate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlManager
的用法示例。
在下文中一共展示了UrlManager::udpate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: error_log
$url = Security::remove_XSS($url_array['url']);
$description = Security::remove_XSS($url_array['description']);
$active = 0;
$url_id = $url_array['id'];
$url_to_go = 'index.php';
if ($url_id != '') {
error_log(__LINE__);
//we can't change the status of the url with id=1
if ($url_id == 1) {
$active = 1;
}
//checking url
if (substr($url, -1) == '/') {
$url .= '/';
}
UrlManager::udpate($url_id, $url, $description, $active, $url_array['url_type'], $url_array);
/*
// URL Images
$url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/';
$image_fields = array("url_image_1", "url_image_2", "url_image_3");
foreach ($image_fields as $image_field) {
if ($_FILES[$image_field]['error'] == 0) {
// Hardcoded: only PNG files allowed
if (end(explode('.', $_FILES[$image_field]['name'])) == 'png') {
move_uploaded_file($_FILES[$image_field]['tmp_name'], $url_images_dir.$url_id.'_'.$image_field.'.png');
}
// else fail silently
}
// else fail silently
}
*/