note 19662 added to function.ob-start

From: Date: Thu, 07 Mar 2002 04:30:34 +0000
Subject: note 19662 added to function.ob-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-27449@lists.php.net to get a copy of this message
regarding Tidy, I've just hacked it into my php/apache setup, so if you own your server, you could try something like this too: Create a shell script: #!/bin/bash ulimit -t 2 echo $1 | tidy -q -config /etc/local/tidy.conf 2>/dev/null exit 0 (change to your tidy conf) and then make a function which you can set to be the output_handler in php.ini: function tidyIt($buffer) { $buffy = return shell_exec("phptidy " . escapeshellarg($buffer); } Make sure the function is available to every page (php gracefully ignores it if not though) and you should find your markup suddenly a lot prettier. Improvements welcome! -- http://www.php.net/manual/en/function.ob-start.php http://master.php.net/manage/user-notes.php?action=edit+19662 http://master.php.net/manage/user-notes.php?action=delete+19662 http://master.php.net/manage/user-notes.php?action=reject+19662

« previous php.notes (#27449) next »