- 1
$news = new news($_GET["news"]);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+146
$news = new news($_GET["news"]);
Обьект класса news. Выводит нужную новость в соответствии с get запросом.
+146
logit("e", "%s No Menu! Wait 5 minutes and try again.\n", whoami);
for(j=0;j<60;j++) {
sleep_ew( 5000 ); /* wait around */
}
sgram из earthworm
+146
function testPrint($str){
return $str;
}
print testPrint("<br>");
Недавно видел такую полезную функцию:)
+146
<? if (1==0) { ?>
сложно было комментарий написать(/**/)
+146
$this->load->model('Bimail');
$this->Bimail->beautymail(
$this->adminmail,
$this->input->post('mail'),
$$this->adminsubject,
$this->input->post('name'),
$this->input->post('text'));
$this->redirect('conn/ok');
Как видите я написал два знака доллара на 5 строке. При таком вызове фукции у мея виснет httpd.exe (это Apach). Кто может объяснить почему?
И еще: почему РНР не выдает ошибки?
*Провернуть такую ошибку в простом коде не получилось.
+146
$module=(!empty($_GET['mod']))?$_GET['mod']:"static";
if(is_file("modules/".$module.".class.php"))
{
include_once("modules/".$module.".class.php");
}
else
{
include_once("modules/error.class.php");
}
от такая хитрожопая система, позволяющая подгружать "модули"
+146
if (cur1!=NULL){
while(cur1!=NULL){
...
}
Вот такие вот потрясающие проверки в духе "нуавдруг?"
+146
<?php $this->html('headscripts') ?>
<?php if($this->data['jsvarurl' ]) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"><!-- site js --></script>
<?php } ?>
<?php if($this->data['pagecss' ]) { ?>
<style type="text/css"><?php $this->html('pagecss' ) ?></style>
<?php }
if($this->data['usercss' ]) { ?>
<style type="text/css"><?php $this->html('usercss' ) ?></style>
<?php }
if($this->data['userjs' ]) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
<?php }
if($this->data['userjsprev']) { ?>
<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
<?php }
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
</head>
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload' ]) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>
Разработчики википедии обожают php-теги
+146
return ($pkey? $pkey : true); // раньше здесь всегда возвращалось true - теперь тоже
+146
...
then begin
sl.Add('['+tt+' '+inttostr(col)+'] '+Edit2.Text+' -> '+nic+edit1.Text);
ProgressBar1.Position:=30;
Re_SL(sl,true);ProgressBar1.Position:=40;
RichEdit2.Lines.Assign(sl);
Re_SL(sl,false);ProgressBar1.Position:=50;
sl.SaveToFile('.\data\chat.hkd');ProgressBar1.Position:=60;StatusBar1.Refresh;
reColor(richEdit2);ProgressBar1.Position:=70;
RichEdit2.Lines.SaveToFile('.\data\_.~tmp');ProgressBar1.Position:=75;StatusBar1.Refresh;
RichEdit1.Lines.LoadFromFile('.\data\_.~tmp');ProgressBar1.Position:=70;
sl.Free;ProgressBar1.Position:=80; StatusBar1.Refresh;
http://codingrus.ru/forum/viewthread.php?forum_id=33&thread_id=30