PHP Cookbook
by Adam Trachtenberg, David Sklar
The following errata were *corrected* in the 4/05 reprint of "PHP Cookbook":
(49) Table 3-3 in the date() column for the minute row
I
NOW READS:
i
(73) line 19 of the code;
print "\n";
if ($day < $totaldays) { print '
'; }
NOW READS:
if ($day < $totaldays) { print "
\n"; }
{243}, the line:
ftruncate($fp,0)
NOW READS:
ftruncate($fh,0)
[444] Solution: line 7 of code counting blank lines.;
$info
NOW READS:
$e
(126) bottom of the page;
See Also
Recipe 10.7 for information on escaping data for a database
NOW READS:
See Also
Recipe 10.9 for information on escaping data for a database
{451} 17.11 Solution;
The book describes a beta version of Net_Whois. Between the time we wrote
the chapter and Net_Whois 1.0, there were
some backwards incompatible changes made to the API. Net_Whois::query() is
no longer a static method
Previously the Solution was:
require 'Net/Whois.php';
$server = 'whois.networksolutions.com';
$query = 'example.org';
$data = Net_whois::query($server, $query);
The Solution NOW READS:
require 'Net/Whois.php';
$server = 'whois.networksolutions.com';
$query = 'example.org';
$whois = new Net_Whois;
$data = $whois->query($server, $query);
In discussion on page 452, the line
"print Net_Whois::query('whois.internic.net', 'example.org');"
NOW READS::
$whois = new Net_Whois;
print $whois->query('example.org', 'whois.internic.net');