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_repair_file - Manual
[go: Go Back, main page]

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

search for in the

tidy_repair_string" width="11" height="7"/> <tidy_parse_string
Last updated: Fri, 19 Sep 2008

view this page in

tidy_repair_file

(PHP 5, PECL tidy:0.7-1.2)

tidy_repair_fileファイルを修正し、それを文字列として返す

説明

string tidy_repair_file ( string $filename [, mixed $config [, string $encoding [, bool $use_include_path ]]] )

この関数は、与えられたファイルを修正し、それを文字列として返します。

config パラメータは、配列または 文字列として指定することができます。文字列として指定した場合には設定ファイルの名前として解釈され、 そうでない場合はオプション自体として解釈されます。各オプションに関する説明については、 » http://tidy.sourceforge.net/docs/quickref.html を参照してください。

encoding パラメータは、文書を入力/出力する際のエンコーディングを 設定します。encoding には次の値を使用可能です。 ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5 および shiftjis.

例1 tidy_repair_file() の例

<?php
$file 
'file.html';

$repaired tidy_repair_file($file);
rename($file$file '.bak');

file_put_contents($file$repaired);
?>

注意: オプションのパラメータ config_optionsenconding は Tidy 2.0 で追加されました。

tidy_parse_file(), tidy_parse_string(), tidy_repair_string() も参照ください。



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

 
show source | credits | sitemap | contact | advertising | mirror sites