Jump to content

tidy extension for PHP help?


random1

Recommended Posts

Hey All,

 

I have the following code ($buffer is a string of all output for the page):

 

		$config = array('indent' => true,
			'fix-uri' => true,
			'wrap' => '1000');

		/* Sources:
		http://tidy.sourceforge.net/docs/quickref.html#fix-backslash
		http://php.net/manual/en/book.tidy.php
		*/

		// Tidy
		$tidy = new tidy();
		$tidy->parseString($buffer, $config, 'utf8');
		$tidy->cleanRepair();
		$buffer = tidy_get_output($tidy);

 

[The tidy extension is enabled in my php.ini file]

 

This produces $buffer being empty at the end with no output (no error).

 

Is this how the 'tidy' extension is used? And ideas?

Link to comment
https://forums.phpfreaks.com/topic/182605-tidy-extension-for-php-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.