mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
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:
parent
97e5b1043e
commit
2203300c84
1 changed files with 21 additions and 21 deletions
|
@ -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 "<b>FATAL</b> [$errno] $errstr<br>\n";
|
||||
echo " Fatal error in line ".__LINE__." of file ".__FILE__;
|
||||
echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n";
|
||||
echo "Aborting...<br>\n";
|
||||
exit -1;
|
||||
break;
|
||||
echo "<b>FATAL</b> [$errno] $errstr<br>\n";
|
||||
echo " Fatal error in line ".__LINE__." of file ".__FILE__;
|
||||
echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n";
|
||||
echo "Aborting...<br>\n";
|
||||
exit -1;
|
||||
break;
|
||||
case ERROR:
|
||||
echo "<b>ERROR</b> [$errno] $errstr<br>\n";
|
||||
break;
|
||||
echo "<b>ERROR</b> [$errno] $errstr<br>\n";
|
||||
break;
|
||||
case WARNING:
|
||||
echo "<b>WARNING</b> [$errno] $errstr<br>\n";
|
||||
break;
|
||||
echo "<b>WARNING</b> [$errno] $errstr<br>\n";
|
||||
break;
|
||||
default:
|
||||
echo "Unkown error type: [$errno] $errstr<br>\n";
|
||||
break;
|
||||
echo "Unkown error type: [$errno] $errstr<br>\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1279,15 +1279,15 @@ function myErrorHandler ($errno, $errstr) {
|
|||
function scale_by_log ($vect, $scale) {
|
||||
if ( !is_numeric($scale) || $scale <= 0 )
|
||||
trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale",
|
||||
FATAL);
|
||||
FATAL);
|
||||
if (!is_array($vect)) {
|
||||
trigger_error("Incorrect input vector, array of values expected", ERROR);
|
||||
return null;
|
||||
}
|
||||
for ($i=0; $i<count($vect); $i++) {
|
||||
if (!is_numeric($vect[$i]))
|
||||
trigger_error("Value at position $i is not a number, using 0 (zero)",
|
||||
WARNING);
|
||||
trigger_error("Value at position $i is not a number, using 0 (zero)",
|
||||
WARNING);
|
||||
$temp[$i] = log($scale) * $vect[$i];
|
||||
}
|
||||
return $temp;
|
||||
|
|
Loading…
Reference in a new issue