"PHP" / Говнокод #693 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
class PliggMailer{

	var $subject = '';
	var $body = '';
	var $from = '';
	var $to = '';

	function PliggMailer($subj = '', $body = '', $from = '', $to = '', $cc = '', $bcc = ''){

		if($subj != ''){$this->subject = $subj;}
		if($body != ''){$this->body = $body;}
		if($from != ''){$this->from = $from;}
		if(!is_array($to)){$to[] = $to;}
		if(count($to) == 0){$this->to = $to;}
		if(!is_array($to)){$to[] = $to;}
		if(count($to) == 0){$this->to = $to;}
		if(!is_array($to)){$to[] = $to;}
		if(count($to) == 0){$this->to = $to;}

	}

Блоговый движок pligg жжот.

Запостил: guest guest, (Updated )

Комментарии (1) RSS

  • Красный Богатырь:
    Наверняка хотели сделать такую же байду, как с $to для $cc и $bcc, и просовокупили.

    зато!
    $ php
    <?php
    
    $to='test@mail.ru';
    if (!is_array($to)) { $to[]= $to; }
    print_r($to);
    
    ?>
    
    Fatal error: [] operator not supported for strings in /home/krasniybogatir/- on line 4
    Ответить

Добавить комментарий

Помни, guest, за тобой могут следить!

    А не использовать ли нам bbcode?


    8