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