fixed minor typo

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@31412 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jesus M. Castagnetto 2000-08-28 08:23:34 +00:00
parent 97e5b1043e
commit 2203300c84

View file

@ -790,10 +790,10 @@ Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr>
echo "<BR><B>ERROR: Script Name needed</B><BR>";
} else {
if (ereg("(\.php|\.inc)$",$script)) {
echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n";
highlight_file($script);
echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n";
highlight_file($script);
} else {
echo "<H1>ERROR: Only PHP or include script names are allowed</H1>";
echo "<H1>ERROR: Only PHP or include script names are allowed</H1>";
}
}
echo "<HR>Processed: ".date("Y/M/d H:i:s",time());
@ -1193,11 +1193,11 @@ $binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66);
$conn = odbc_connect ("webdb", "php", "chicken");
$stmt = odbc_prepare ($conn,
"UPDATE sessions SET data = ? WHERE id = ?");
"UPDATE sessions SET data = ? WHERE id = ?");
$sqldata = array (serialize($session_data), $PHP_AUTH_USER);
if (!odbc_execute ($stmt, &$sqldata)) {
$stmt = odbc_prepare($conn,
"INSERT INTO sessions (id, data) VALUES(?, ?)");
"INSERT INTO sessions (id, data) VALUES(?, ?)");
if (!odbc_execute($stmt, &$sqldata)) {
/* Something went wrong. Bitch, whine and moan. */
}
@ -1210,7 +1210,7 @@ if (!odbc_execute ($stmt, &$sqldata)) {
<refentry id="function.set-error-handler">
<refnamediv>
<refname>set_error_handlers</refname>
<refname>set_error_handler</refname>
<refpurpose>
Sets a user-defined error handler function.
</refpurpose>
@ -1257,21 +1257,21 @@ error_reporting(FATAL + ERROR + WARNING);
function myErrorHandler ($errno, $errstr) {
switch ($errno) {
case FATAL:
echo &quot;&lt;b&gt;FATAL&lt;/b&gt; [$errno] $errstr&lt;br&gt;\n&quot;;
echo &quot; Fatal error in line &quot;.__LINE__.&quot; of file &quot;.__FILE__;
echo &quot;, PHP &quot;.PHP_VERSION.&quot; (&quot;.PHP_OS.&quot;)&lt;br&gt;\n&quot;;
echo &quot;Aborting...&lt;br&gt;\n&quot;;
exit -1;
break;
echo &quot;&lt;b&gt;FATAL&lt;/b&gt; [$errno] $errstr&lt;br&gt;\n&quot;;
echo &quot; Fatal error in line &quot;.__LINE__.&quot; of file &quot;.__FILE__;
echo &quot;, PHP &quot;.PHP_VERSION.&quot; (&quot;.PHP_OS.&quot;)&lt;br&gt;\n&quot;;
echo &quot;Aborting...&lt;br&gt;\n&quot;;
exit -1;
break;
case ERROR:
echo &quot;&lt;b&gt;ERROR&lt;/b&gt; [$errno] $errstr&lt;br&gt;\n&quot;;
break;
echo &quot;&lt;b&gt;ERROR&lt;/b&gt; [$errno] $errstr&lt;br&gt;\n&quot;;
break;
case WARNING:
echo &quot;&lt;b&gt;WARNING&lt;/b&gt; [$errno] $errstr&lt;br&gt;\n&quot;;
break;
echo &quot;&lt;b&gt;WARNING&lt;/b&gt; [$errno] $errstr&lt;br&gt;\n&quot;;
break;
default:
echo &quot;Unkown error type: [$errno] $errstr&lt;br&gt;\n&quot;;
break;
echo &quot;Unkown error type: [$errno] $errstr&lt;br&gt;\n&quot;;
break;
}
}
@ -1279,15 +1279,15 @@ function myErrorHandler ($errno, $errstr) {
function scale_by_log ($vect, $scale) {
if ( !is_numeric($scale) || $scale &lt;= 0 )
trigger_error(&quot;log(x) for x &lt;= 0 is undefined, you used: scale = $scale&quot;,
FATAL);
FATAL);
if (!is_array($vect)) {
trigger_error(&quot;Incorrect input vector, array of values expected&quot;, ERROR);
return null;
}
for ($i=0; $i&lt;count($vect); $i++) {
if (!is_numeric($vect[$i]))
trigger_error(&quot;Value at position $i is not a number, using 0 (zero)&quot;,
WARNING);
trigger_error(&quot;Value at position $i is not a number, using 0 (zero)&quot;,
WARNING);
$temp[$i] = log($scale) * $vect[$i];
}
return $temp;