mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Fixed typos + cosmetic changes
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@27864 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
14d2ce1f6e
commit
305206c5a1
11 changed files with 35 additions and 28 deletions
|
@ -766,7 +766,7 @@ array_values($array); // returns array("XL", "gold")
|
|||
<programlisting role="php">
|
||||
$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
|
||||
|
||||
function test_alter (&$item1, $key, $prefix) {
|
||||
function test_alter (&$item1, $key, $prefix) {
|
||||
$item1 = "$prefix: $item1";
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ while($pagecount-- > 0) {
|
|||
|
||||
/* minute strokes */
|
||||
cpdf_setlinewidth($pdf, 2.0);
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 6)
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 6)
|
||||
{
|
||||
cpdf_rotate($pdf, 6.0);
|
||||
cpdf_moveto($pdf, $radius, 0.0);
|
||||
|
@ -117,7 +117,7 @@ while($pagecount-- > 0) {
|
|||
|
||||
/* 5 minute strokes */
|
||||
cpdf_setlinewidth($pdf, 3.0);
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 30)
|
||||
for ($alpha = 0; $alpha < 360; $alpha += 30)
|
||||
{
|
||||
cpdf_rotate($pdf, 30.0);
|
||||
cpdf_moveto($pdf, $radius, 0.0);
|
||||
|
|
|
@ -146,7 +146,7 @@ closedir($handle);
|
|||
<?php
|
||||
$handle=opendir('.');
|
||||
while ($file = readdir($handle)) {
|
||||
if ($file != "." && $file != "..") {
|
||||
if ($file != "." && $file != "..") {
|
||||
echo "$file\n";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<simpara>
|
||||
Forms Data Format (FDF) is a format for handling
|
||||
forms within PDF documents. You should read the documentation at
|
||||
<ulink url="&spec.pdf.fdf">&spec.pdf.fdf</ulink>
|
||||
<ulink url="&spec.pdf.fdf;">&spec.pdf.fdf;</ulink>
|
||||
for more information on what FDF is and how it is used in general.
|
||||
</simpara>
|
||||
|
||||
|
|
|
@ -465,10 +465,10 @@ $row = 1;
|
|||
$fp = fopen ("test.csv","r");
|
||||
while ($data = fgetcsv ($fp, 1000, ",")) {
|
||||
$num = count ($data);
|
||||
print "<p> $num fields in line $row: <br>";
|
||||
print "<p> $num fields in line $row: <br>";
|
||||
$row++;
|
||||
for ($c=0; $c<$num; $c++) {
|
||||
print $data[$c] . "<br>";
|
||||
for ($c=0; $c<$num; $c++) {
|
||||
print $data[$c] . "<br>";
|
||||
}
|
||||
}
|
||||
fclose ($fp);
|
||||
|
@ -2158,7 +2158,7 @@ if ( touch($FileName) ) {
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>Umask</function> sets PHP's umask to mask & 0777 and
|
||||
<function>Umask</function> sets PHP's umask to mask & 0777 and
|
||||
returns the old umask. When PHP is being used as a server module,
|
||||
the umask is restored when each request is finished.
|
||||
</para>
|
||||
|
|
|
@ -545,7 +545,7 @@ ifx_free_result($res_id);
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
The Informix error codes (SQLSTATE & SQLCODE) formatted as
|
||||
The Informix error codes (SQLSTATE & SQLCODE) formatted as
|
||||
follows :
|
||||
</para>
|
||||
<para>
|
||||
|
@ -888,7 +888,7 @@ $types = ifx_fieldtypes ($resultid);
|
|||
if (! isset ($types)) {
|
||||
... error ...
|
||||
}
|
||||
for ($i = 0; $i < count($types); $i++) {
|
||||
for ($i = 0; $i < count($types); $i++) {
|
||||
$fname = key($types);
|
||||
printf("%s :\t type = %s\n", $fname, $types[$fname]);
|
||||
next($types);
|
||||
|
@ -929,7 +929,7 @@ $properties = ifx_fieldtypes ($resultid);
|
|||
if (! isset($properties)) {
|
||||
... error ...
|
||||
}
|
||||
for ($i = 0; $i < count($properties); $i++) {
|
||||
for ($i = 0; $i < count($properties); $i++) {
|
||||
$fname = key ($properties);
|
||||
printf ("%s:\t type = %s\n", $fname, $properties[$fname]);
|
||||
next ($properties);
|
||||
|
|
|
@ -67,12 +67,12 @@
|
|||
<title>GetImageSize returning IPTC</title>
|
||||
<programlisting>
|
||||
<?php
|
||||
$size = GetImageSize ("testimg.jpg",&$info);
|
||||
$size = GetImageSize ("testimg.jpg",&$info);
|
||||
if (isset ($info["APP13"])) {
|
||||
$iptc = iptcparse ($info["APP13"]);
|
||||
var_dump ($iptc);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
<note>
|
||||
|
|
|
@ -348,7 +348,7 @@ $mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
|
|||
|| die("can't connect: ".imap_last_error());
|
||||
|
||||
$name1 = "phpnewbox";
|
||||
$name2 = imap_utf7_encode("phpnewböx");
|
||||
$name2 = imap_utf7_encode("phpnewböx");
|
||||
|
||||
$newname = $name1;
|
||||
|
||||
|
@ -2575,9 +2575,14 @@ imap_close($mbox);
|
|||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
<function>imap_mime_header_decode</function> function decodes MIME message header extensions that are non ASCII text (see <ulink url="&url.rfc;rfc2047.html">RFC2047</ulink>)
|
||||
The decoded elements are returned in an array of objects, where each object has two properties, "charset" & "text".
|
||||
If the element hasn't been encoded, and in other words is in plain US-ASCII,the "charset" property of that element is set to "default".
|
||||
<function>imap_mime_header_decode</function> function decodes
|
||||
MIME message header extensions that are non ASCII text
|
||||
(see <ulink url="&url.rfc;rfc2047.html">RFC2047</ulink>)
|
||||
The decoded elements are returned in an array of objects,
|
||||
where each object has two properties, "charset" & "text".
|
||||
If the element hasn't been encoded, and in other words is in
|
||||
plain US-ASCII,the "charset" property of that element is set to
|
||||
"default".
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
|
@ -2595,11 +2600,13 @@ for($i=0;$i<count($elements);$i++) {
|
|||
</example>
|
||||
</para>
|
||||
<para>
|
||||
In the above example we would have two elements, whereas the first element had previously been encoded with ISO-8859-1, and the second element would be plain US-ASCII.
|
||||
In the above example we would have two elements, whereas the first
|
||||
element had previously been encoded with ISO-8859-1, and the second
|
||||
element would be plain US-ASCII.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
<refentry id="function.imap-mail-compose">
|
||||
<refnamediv>
|
||||
<refname>imap_mail_compose</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<reference id="ref.info">
|
||||
<title>PHP options & information</title>
|
||||
<title>PHP options & information</title>
|
||||
<titleabbrev>PHP options/info</titleabbrev>
|
||||
|
||||
<refentry id="function.error-log">
|
||||
|
|
|
@ -92,7 +92,7 @@ if ($ds) {
|
|||
$info = ldap_get_entries($ds, $sr);
|
||||
echo "Data for ".$info["count"]." items returned:<p>";
|
||||
|
||||
for ($i=0; $i<$info["count"]; $i++) {
|
||||
for ($i=0; $i<$info["count"]; $i++) {
|
||||
echo "dn is: ". $info[$i]["dn"] ."<br>";
|
||||
echo "first cn entry is: ". $info[$i]["cn"][0] ."<br>";
|
||||
echo "first email entry is: ". $info[$i]["mail"][0] ."<p>";
|
||||
|
@ -668,7 +668,7 @@ $attrs = ldap_get_attributes($ds, $entry);
|
|||
|
||||
echo $attrs["count"]." attributes held for this entry:<p>";
|
||||
|
||||
for ($i=0; $i<$attrs["count"]; $i++)
|
||||
for ($i=0; $i<$attrs["count"]; $i++)
|
||||
echo $attrs[$i]."<br>";
|
||||
</programlisting>
|
||||
</example></para>
|
||||
|
@ -913,7 +913,7 @@ $sr=ldap_list($ds, $basedn, "ou=*", $justthese);
|
|||
|
||||
$info = ldap_get_entries($ds, $sr);
|
||||
|
||||
for ($i=0; $i<$info["count"]; $i++)
|
||||
for ($i=0; $i<$info["count"]; $i++)
|
||||
echo $info[$i]["ou"][0] ;
|
||||
</programlisting>
|
||||
</example></para>
|
||||
|
@ -1178,7 +1178,7 @@ print $info["count"]." entries returned<p>";
|
|||
<title>Enumerating all LDAP error messages</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
for($i=0; $i<100; $i++) {
|
||||
for($i=0; $i<100; $i++) {
|
||||
printf("Error $i: %s<br>\n", ldap_str2err($i));
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -898,10 +898,10 @@ $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)) {
|
||||
if (!odbc_execute($stmt, &$sqldata)) {
|
||||
/* Something went wrong. Bitch, whine and moan. */
|
||||
}
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ $array = unpack ("c2chars/nint", $binarydata);
|
|||
$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