本文整理匯總了PHP中Strings::txt2array方法的典型用法代碼示例。如果您正苦於以下問題:PHP Strings::txt2array方法的具體用法?PHP Strings::txt2array怎麽用?PHP Strings::txt2array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Strings
的用法示例。
在下文中一共展示了Strings::txt2array方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: flash
} else {
flash();
}
}
if (isset($_POST['saveregister'])) {
$updated = false;
if (isset($_POST['data']['setting']['register_type']) && $_POST['data']['setting']['register_type'] != "close_register") {
if (!empty($_POST['data']['setting']['reg_filename']) && !pb_strcomp($_POST['data']['setting']['reg_filename'], $_POST['data']['reg_filename'])) {
$renameResult = rename(PHPB2B_ROOT . 'register.php', PHPB2B_ROOT . $_POST['data']['setting']['reg_filename']);
}
if (!empty($_POST['data']['setting']['post_filename']) && !pb_strcomp($_POST['data']['setting']['post_filename'], $_POST['data']['post_filename'])) {
$renameResult = rename(PHPB2B_ROOT . 'post.php', PHPB2B_ROOT . $_POST['data']['setting']['post_filename']);
}
}
if (!empty($_POST['data']['forbid_ip'])) {
$datas = $string->txt2array($_POST['data']['forbid_ip']);
if (!empty($datas)) {
foreach ($datas as $val) {
list($ip1, $ip2, $ip3, $ip4) = explode(".", $val);
$tmp_ip[] = "('" . $ip1 . "','" . $ip2 . "','" . $ip3 . "','" . $ip4 . "')";
}
$values = implode(",", $tmp_ip);
if (!empty($tmp_ip)) {
$pdb->Execute("INSERT INTO {$tb_prefix}banned (ip1,ip2,ip3,ip4) VALUES " . $values);
}
}
}
if (!empty($_POST['data']['forbid_word'])) {
$datas = $string->txt2array($_POST['data']['forbid_word']);
if (!empty($datas)) {
$cache->writeCache("words", "words", "\$_PB_CACHE['words'] = " . $cache->evalArray($datas));