使用html tidy转换出现error:can't open"",Html tidy

Yep, looks like tidy for php4 is significantly different than for php5. Here's my test code:

ob_start();

echo '

';

print_r(get_loaded_extensions());

print_r(get_extension_funcs('tidy'));

echo '

';

$out1 = ob_get_contents();

ob_end_clean();

$html = '

' . $out1 . '';

$config = array('indent'=> TRUE,

'output-xhtml' => TRUE,

'wrap' => 80);

tidy_set_encoding('UTF8');

foreach ($config as $key => $value) {

tidy_setopt($key,$value);

}

tidy_parse_string($html);

tidy_clean_repair();

echo tidy_get_output();

?>

which gave me usable xhtml:

/p>

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 
 

Array

(

[0] => standard

[1] => openssl

[2] => apache

[3] => bz2

[4] => ctype

[5] => curl

[6] => ftp

[7] => gd

[8] => mcrypt

[9] => mhash

[10] => mysql

[11] => overload

[12] => pcre

[13] => pdf

[14] => posix

[15] => session

[16] => tokenizer

[17] => xml

[18] => xslt

[19] => zlib

[20] => tidy

)

Array

(

[0] => tidy_setopt

[1] => tidy_getopt

[2] => tidy_parse_string

[3] => tidy_parse_file

[4] => tidy_get_output

[5] => tidy_get_error_buffer

[6] => tidy_clean_repair

[7] => tidy_repair_string

[8] => tidy_repair_file

[9] => tidy_diagnose

[10] => tidy_get_release

[11] => tidy_get_config

[12] => tidy_get_status

[13] => tidy_get_html_ver

[14] => tidy_is_xhtml

[15] => tidy_is_xml

[16] => tidy_error_count

[17] => tidy_warning_count

[18] => tidy_access_count

[19] => tidy_config_count

[20] => tidy_load_config

[21] => tidy_load_config_enc

[22] => tidy_set_encoding

[23] => tidy_save_config

)

So I suppose this means that I'm tough out of luck with this module until my ISP is forced to upgrade to PHP5 sometime in 2008 when official support runs dry (not sure they'll do it even then, I just don't know). Maybe by then I'll be experienced enough to backfill php4 tidy support myself. heh.

微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码 微信小程序毕业设计期末大作业项目源码
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值