Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tidy_repair_file(3) [php man page]

TIDY_REPAIR_FILE(3)							 1						       TIDY_REPAIR_FILE(3)

tidy::repairFile - Repair a file and return it as a string

       Object oriented style

SYNOPSIS
string tidy::repairFile (string $filename, [mixed $config], [string $encoding], [bool $use_include_path = false]) DESCRIPTION
Procedural style string tidy_repair_file (string $filename, [mixed $config], [string $encoding], [bool $use_include_path = false]) Repairs the given file and returns it as a string. PARAMETERS
o $filename - The file to be repaired. o $config - The config $config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. Check http://tidy.sourceforge.net/docs/quickref.html for an explanation about each option. o $encoding - The $encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis. o $use_include_path - Search for the file in the include_path. RETURN VALUES
Returns the repaired contents as a string. EXAMPLES
Example #1 tidy_repair_file(3) example <?php $file = 'file.html'; $tidy = new tidy(); $repaired = $tidy->repairfile($file); rename($file, $file . '.bak'); file_put_contents($file, $repaired); ?> NOTES
Note The optional parameters $config and $encoding were added in Tidy 2.0. SEE ALSO
tidy.parseFile(3), tidy.parseString(3), tidy.repairString(3). PHP Documentation Group TIDY_REPAIR_FILE(3)

Check Out this Related Man Page

TIDY.REPAIRFILE(3)							 1							TIDY.REPAIRFILE(3)

tidy::repairFile - Repair a file and return it as a string

       Object oriented style

SYNOPSIS
string tidy::repairFile (string $filename, [mixed $config], [string $encoding], [bool $use_include_path = false]) DESCRIPTION
Procedural style string tidy_repair_file (string $filename, [mixed $config], [string $encoding], [bool $use_include_path = false]) Repairs the given file and returns it as a string. PARAMETERS
o $filename - The file to be repaired. o $config - The config $config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. Check http://tidy.sourceforge.net/docs/quickref.html for an explanation about each option. o $encoding - The $encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis. o $use_include_path - Search for the file in the include_path. RETURN VALUES
Returns the repaired contents as a string. EXAMPLES
Example #1 tidy.repairFile(3) example <?php $file = 'file.html'; $tidy = new tidy(); $repaired = $tidy->repairfile($file); rename($file, $file . '.bak'); file_put_contents($file, $repaired); ?> NOTES
Note The optional parameters $config and $encoding were added in Tidy 2.0. SEE ALSO
tidy.parseFile(3), tidy.parseString(3), tidy.repairString(3). PHP Documentation Group TIDY.REPAIRFILE(3)
Man Page

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

please help - script to list and rename

Hi Friend, I have a small script to list all file FFAAAAABBBBB00001 and FFAAAAABBBBB00001.repaired (when I run another script, the orginal file will output another *.repaired file) in my unix directory, and reaname the output file FFAAAAABBBBB00001.repaired back to FFAAAABBBBB00001. However, it... (2 Replies)
Discussion started by: happyv
2 Replies

2. UNIX for Dummies Questions & Answers

may a corrupted .gz file be repaired?

Preparing for a move to a new server, I needed to offload about somewhat over a gigabyte of newsfeeds that my website collects, and that I had been saving on the server. I tarred them and zipped them into about a dozen smaller files of about 150Mb each. All seemed well. I downloaded them onto my... (3 Replies)
Discussion started by: JohnTinker
3 Replies

3. Solaris

IPMP config

Hi All, I have unplumbed one interface. after that ifconfig -a shows that lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 ... (7 Replies)
Discussion started by: jegaraman
7 Replies

4. Shell Programming and Scripting

awk modify multiple columns with pipes

Hello, I have a CSV-like dataset where some of the columns contain HTML snippets which I need to convert to XHTML. For any given snippet, I have a functioning config for the text processor 'tidy' such that tidy -config tidy.cfg example.html does the job I need done. I would like to process... (10 Replies)
Discussion started by: bstamper
10 Replies