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


PHP iaSanitize::convertStr方法代碼示例

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


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

示例1: utf8_to_ascii

     } else {
         $data['member_id'] = $member_id;
     }
 } else {
     $data['member_id'] = iaUsers::getIdentity()->id;
 }
 if (!defined('IA_NOUTF')) {
     iaUtf8::loadUTF8Core();
     iaUtf8::loadUTF8Util('ascii', 'validation', 'bad', 'utf8_to_ascii');
 }
 // validate title_alias
 $data['title_alias'] = !empty($_POST['title_alias']) ? $_POST['title_alias'] : $_POST['title'];
 if (!utf8_is_ascii($data['title_alias'])) {
     $data['title_alias'] = utf8_to_ascii($data['title_alias']);
 }
 $data['title_alias'] = iaSanitize::convertStr($data['title_alias']);
 // check for duplicate title_alias in case a new album is added or title_alias has been updated
 if (!isset($item['title_alias']) || isset($item['title_alias']) && $data['title_alias'] != $item['title_alias']) {
     if ($iaAlbum->existsAlias($data['title_alias'])) {
         $error = true;
         $messages[] = iaLanguage::get('album_already_exists');
     }
 }
 if (!$error) {
     $iaCore->startHook("phpAdminBeforeAlbumSubmit");
     if (!empty($_POST['artist'])) {
         $artist_info = $iaArtist->getArtistByTitle($_POST['artist']);
         $data['id_artist'] = $artist_info['id'];
         $data['artist_alias'] = $artist_info['title_alias'];
     }
     $data['status'] = check_post('status');
開發者ID:nicefirework,項目名稱:subrion-lyrics,代碼行數:31,代碼來源:albums.php


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