note 104581 added to function.ob-start

From: Date: Thu, 23 Jun 2011 21:14:35 +0000
Subject: note 104581 added to function.ob-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-180899@lists.php.net to get a copy of this message
I have this function with ob_handler used in Ajaxel CMS: <?php public static function parse($html) { return substr(preg_replace('~(.*)(<textarea.*<\/textarea>)~Usie', "OB::friendly('$1',true) .str_replace('\\\"','\"','$2')", $html .'<textarea></textarea>'),0,-21); } public static function friendly ($html, $preg = false) { if ($preg) $html = str_replace('\"','"',$html); $html = str_replace('&amp;','[[:AMP:]]',$html); if (HTTP_EXT) $html = str_replace(' href="/"',' href="/?'.URL_KEY_HOME.'"',$html); $html = preg_replace('~(\shref="|\saction="|location\.href=\')(\?|\/\?)([^;]*)(\'\+\$\(|"|\')~Uie', "self::_friendly('?$3','$1','$4')",$html); self::images($html); $html = str_replace('[[:AMP:]]','&amp;',$html); return $html; } private static function _friendly($url,$start,$end) { return str_replace('\"','"',$start). URL::HT($url).str_replace('\"','"',$end); } ?> if u understand this, u're the good programmer :) stupid PHP.net with their wordwrap shit ---- Server IP: 217.146.68.100 Probable Submitter: 89.235.200.174 ---- Manual Page -- http://www.php.net/manual/en/function.ob-start.php Edit -- https://master.php.net/note/edit/104581 Del: integrated -- https://master.php.net/note/delete/104581/integrated Del: useless -- https://master.php.net/note/delete/104581/useless Del: bad code -- https://master.php.net/note/delete/104581/bad+code Del: spam -- https://master.php.net/note/delete/104581/spam Del: non-english -- https://master.php.net/note/delete/104581/non-english Del: in docs -- https://master.php.net/note/delete/104581/in+docs Del: other reasons-- https://master.php.net/note/delete/104581 Reject -- https://master.php.net/note/reject/104581 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180899) next »