
30.03.2007, 12:14
|
|
Постоянный
Регистрация: 11.03.2007
Сообщений: 581
Провел на форуме: 4172659
Репутация:
646
|
|
JavaScript попап
Код:
function popup(height,width,tittle,text)
{
msg=window.open("","msg","height="+height+",width="+width+",left=300,top=300");
msg.document.write("<html><title>"+tittle+"</title>");
msg.document.write("<b"+"ody onblur=window.close()>");
msg.document.write(text);
msg.document.write("</b"+"ody></html>");
}
Только что дорабатывал скрипт своей гостевой и с удивлением заметил, что в PHP < 5 отсутствует столь важная функция str_ireplace. Но безвыходных ситуаций не бывает
PHP код:
if(!function_exists('str_ireplace'))
{
function str_ireplace($search,$replace,$subject)
{
$search = preg_quote($search, "/");
return preg_replace("/".$search."/i", $replace, $subject);
}
}
Последний раз редактировалось Joker-jar; 31.03.2007 в 09:30..
|
|
|