mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Typo fixes
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@63819 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
10844e7633
commit
f39c2b0435
8 changed files with 30 additions and 30 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.63 $ -->
|
||||
<!-- $Revision: 1.64 $ -->
|
||||
<reference id="ref.pcre">
|
||||
<title>Regular Expression Functions (Perl-Compatible)</title>
|
||||
<titleabbrev>PCRE</titleabbrev>
|
||||
|
@ -439,24 +439,24 @@ preg_replace ("/(<\/?)(\w+)([^>]*>)/e",
|
|||
// common HTML entities to their text equivalent.
|
||||
|
||||
$search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript
|
||||
"'<[\/\!]*?[^<>]*?>'si", // Strip out html tags
|
||||
"'([\r\n])[\s]+'", // Strip out white space
|
||||
"'&(quot|#34);'i", // Replace html entities
|
||||
"'&(amp|#38);'i",
|
||||
"'&(lt|#60);'i",
|
||||
"'&(gt|#62);'i",
|
||||
"'&(nbsp|#160);'i",
|
||||
"'&(iexcl|#161);'i",
|
||||
"'&(cent|#162);'i",
|
||||
"'&(pound|#163);'i",
|
||||
"'&(copy|#169);'i",
|
||||
"'&#(\d+);'e"); // evaluate as php
|
||||
"'<[\/\!]*?[^<>]*?>'si", // Strip out html tags
|
||||
"'([\r\n])[\s]+'", // Strip out white space
|
||||
"'&(quot|#34);'i", // Replace html entities
|
||||
"'&(amp|#38);'i",
|
||||
"'&(lt|#60);'i",
|
||||
"'&(gt|#62);'i",
|
||||
"'&(nbsp|#160);'i",
|
||||
"'&(iexcl|#161);'i",
|
||||
"'&(cent|#162);'i",
|
||||
"'&(pound|#163);'i",
|
||||
"'&(copy|#169);'i",
|
||||
"'&#(\d+);'e"); // evaluate as php
|
||||
|
||||
$replace = array ("",
|
||||
"",
|
||||
"\\1",
|
||||
"\"",
|
||||
"&",
|
||||
"&",
|
||||
"<",
|
||||
">",
|
||||
" ",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.48 $ -->
|
||||
<!-- $Revision: 1.49 $ -->
|
||||
<reference id="ref.pgsql">
|
||||
<title>PostgreSQL functions</title>
|
||||
<titleabbrev>PostgreSQL</titleabbrev>
|
||||
|
@ -161,7 +161,7 @@
|
|||
<?php
|
||||
$result = pg_exec ($conn, "INSERT INTO publisher VALUES ('Author')");
|
||||
$cmdtuples = pg_cmdtuples ($result);
|
||||
echo $cmdtuples . " <- cmdtuples affected.";
|
||||
echo $cmdtuples . " cmdtuples affected.";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<reference id="ref.readline">
|
||||
<title>GNU Readline</title>
|
||||
<titleabbrev>Readline</titleabbrev>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
//get 3 commands from user
|
||||
for ($i=0; $i < 3; $i++) {
|
||||
for ($i=0; $i < 3; $i++) {
|
||||
$line = readline ("Command: ");
|
||||
readline_add_history ($line);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.57 $ -->
|
||||
<!-- $Revision: 1.58 $ -->
|
||||
<reference id="ref.session">
|
||||
<title>Session handling functions</title>
|
||||
<titleabbrev>Sessions</titleabbrev>
|
||||
|
@ -152,7 +152,7 @@ session_register ("count");
|
|||
$count++;
|
||||
?>
|
||||
|
||||
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>
|
||||
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>;
|
||||
|
||||
<?php
|
||||
# the <?=SID?> is necessary to preserve the session id
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.24 $ -->
|
||||
<!-- $Revision: 1.25 $ -->
|
||||
<reference id="ref.sockets">
|
||||
<title>Socket functions</title>
|
||||
<titleabbrev>Sockets</titleabbrev>
|
||||
|
@ -552,11 +552,11 @@ echo "OK.\n\n";
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (($socket = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
|
||||
if (($socket = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
|
||||
echo "socket() failed: reason: " . strerror ($socket) . "\n";
|
||||
}
|
||||
|
||||
if (($ret = bind ($socket, '127.0.0.1', 80)) < 0) {
|
||||
if (($ret = bind ($socket, '127.0.0.1', 80)) < 0) {
|
||||
echo "bind() failed: reason: " . strerror ($ret) . "\n";
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.127 $ -->
|
||||
<!-- $Revision: 1.128 $ -->
|
||||
<reference id="ref.strings">
|
||||
<title>String functions</title>
|
||||
<titleabbrev>Strings</titleabbrev>
|
||||
|
@ -1941,7 +1941,7 @@ echo "Item $serial was manufactured on: $year-".substr($month,0,3)."-$day\n";
|
|||
<![CDATA[
|
||||
// get author info and generate DocBook entry
|
||||
$auth = "24\tLewis Carroll";
|
||||
$n = sscanf($auth,"%d\t%s %s", &$id, &$first, &$last);
|
||||
$n = sscanf($auth,"%d\t%s %s", &$id, &$first, &$last);
|
||||
echo "<author id='$id'>
|
||||
<firstname>$first</firstname>
|
||||
<surname>$last</surname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.20 $ -->
|
||||
<!-- $Revision: 1.21 $ -->
|
||||
<reference id="ref.url">
|
||||
<title>URL Functions</title>
|
||||
<titleabbrev>URLs</titleabbrev>
|
||||
|
@ -188,7 +188,7 @@ $i = 0;
|
|||
while ($i < count($a)) {
|
||||
$b = split('=', $a[$i]);
|
||||
echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])),
|
||||
' is ', htmlspecialchars(urldecode($b[1])), "<br>";
|
||||
' is ', htmlspecialchars(urldecode($b[1])), "<br />\n";
|
||||
$i++;
|
||||
}
|
||||
]]>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.77 $ -->
|
||||
<!-- $Revision: 1.78 $ -->
|
||||
<reference id="ref.variables">
|
||||
<title>Variable Functions</title>
|
||||
<titleabbrev>Variables</titleabbrev>
|
||||
|
@ -985,7 +985,7 @@ $conn = odbc_connect ("webdb", "php", "chicken");
|
|||
$stmt = odbc_prepare ($conn,
|
||||
"UPDATE sessions SET data = ? WHERE id = ?");
|
||||
$sqldata = array (serialize($session_data), $PHP_AUTH_USER);
|
||||
if (!odbc_execute ($stmt, &$sqldata)) {
|
||||
if (!odbc_execute ($stmt, &$sqldata)) {
|
||||
$stmt = odbc_prepare($conn,
|
||||
"INSERT INTO sessions (id, data) VALUES(?, ?)");
|
||||
if (!odbc_execute($stmt, &$sqldata)) {
|
||||
|
@ -1164,7 +1164,7 @@ settype($bar, "string"); // $bar is now "1" (string)
|
|||
$conn = odbc_connect ("webdb", "php", "chicken");
|
||||
$stmt = odbc_prepare ($conn, "SELECT data FROM sessions WHERE id = ?");
|
||||
$sqldata = array ($PHP_AUTH_USER);
|
||||
if (!odbc_execute ($stmt, &$sqldata) || !odbc_fetch_into ($stmt, &$tmp)) {
|
||||
if (!odbc_execute ($stmt, &$sqldata) || !odbc_fetch_into ($stmt, &$tmp)) {
|
||||
// if the execute or fetch fails, initialize to empty array
|
||||
$session_data = array();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue