Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: tidy_getopt - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

tidy_is_xhtml" width="11" height="7"/> <tidy_get_status
Last updated: Fri, 27 Feb 2009

view this page in

tidy_getopt

(PHP 5, PECL tidy >= 0.5.2)

tidy_getoptTidy ドキュメントについて指定した設定オプションの値を返す

説明

手続き型:

mixed tidy_getopt ( tidy $object , string $option )

オブジェクト指向型:

mixed tidy->getOpt ( string $option )

tidy_getopt() は、 Tidy オブジェクト object について指定した設定オプション option の値を返します。 返される型は、設定オプション option の型に依存します。 それぞれの設定オプションと型の一覧は、» http://tidy.sourceforge.net/docs/quickref.html にあります。

例1 tidy_getopt() の例

<?php

$html 
='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head><title>Title</title></head>
<body>

<p><img src="img.png"></p>

</body></html>'
;

$config = array('accessibility-check' => 3,
                
'alt-text' => 'some text');

$tidy = new tidy();
$tidy->parseString($html$config);


var_dump($tidy->getOpt('accessibility-check')); //integer
var_dump($tidy->getOpt('lower-literals')); //boolean
var_dump($tidy->getOpt('alt-text')); //string

?>

上の例の出力は以下となります。

int(3)
bool(true)
string(9) "some text"



add a note add a note User Contributed Notes
tidy_getopt
There are no user contributed notes for this page.

tidy_is_xhtml" width="11" height="7"/> <tidy_get_status
Last updated: Fri, 27 Feb 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites