mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
fix a bunch more entities that cause a stricter xml parser (xerces) to choke
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@39899 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8b4e606f06
commit
7dd641009b
11 changed files with 23 additions and 23 deletions
|
@ -175,7 +175,7 @@ move_uploaded_file($userfile, "/place/to/put/uploaded/file");
|
|||
</note>
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
<?php
|
||||
/* Userland test for uploaded file. */
|
||||
function is_uploaded_file($filename) {
|
||||
if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
|
||||
|
|
|
@ -126,7 +126,7 @@ $garr = array(
|
|||
create_function('$b,$a','if (strncmp($a,$b,3) == 0) return "** \"$a\" '.
|
||||
'and \"$b\"\n** Look the same to me! (looking at the first 3 chars)";'),
|
||||
create_function('$a,$b','; return "CRCs: ".crc32($a)." , ".crc32(b);'),
|
||||
create_function('$a,$b','; return "similar(a,b) = ".similar_text($a,$b,&$p)."($p%)";')
|
||||
create_function('$a,$b','; return "similar(a,b) = ".similar_text($a,$b,&$p)."($p%)";')
|
||||
);
|
||||
echo "\nUsing the second array of anonymous functions\n";
|
||||
process("Twas brilling and the slithy toves", "Twas the night", $garr);
|
||||
|
@ -157,7 +157,7 @@ similar(a,b) = 11(45.833333333333%)
|
|||
<title>Using anonymous functions as callback functions</title>
|
||||
<programlisting role="php">
|
||||
$av = array("the ","a ","that ","this ");
|
||||
array_walk($av, create_function('&$v,$k','$v = $v."mango";'));
|
||||
array_walk($av, create_function('&$v,$k','$v = $v."mango";'));
|
||||
print_r($av); // for PHP 3 use var_dump()
|
||||
// outputs:
|
||||
// Array
|
||||
|
|
|
@ -40,14 +40,14 @@
|
|||
<programlisting role="php">
|
||||
<?php
|
||||
function fact ($x) {
|
||||
if ($x <= 1)
|
||||
if ($x <= 1)
|
||||
return 1;
|
||||
else
|
||||
return gmp_mul ($x, fact ($x-1));
|
||||
}
|
||||
|
||||
print gmp_strval (fact (1000)) . "\n";
|
||||
?>
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
|
|
@ -345,7 +345,7 @@ magic_quotes_sybase = On
|
|||
|
||||
$rs=ibase_query("Select * from something");
|
||||
$coln = ibase_num_fields($rs);
|
||||
for ($i=0 ; $i < $coln ; $i++) {
|
||||
for ($i=0 ; $i < $coln ; $i++) {
|
||||
$col_info = ibase_field_info($rs, $i);
|
||||
echo "name: ".$col_info['name']."\n";
|
||||
echo "alias: ".$col_info['alias']."\n";
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
A detailed overview is also available in the books
|
||||
<ulink url="&url.email.book;">Programming Internet Email</ulink>
|
||||
by David Wood and <ulink url="&url.imap.book;">Managing
|
||||
IMAP</ulink> by Dianna Mullet & Kevin Mullet.
|
||||
IMAP</ulink> by Dianna Mullet & Kevin Mullet.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
|
|
|
@ -400,11 +400,11 @@ $db_list = mysql_list_dbs();
|
|||
|
||||
$i = 0;
|
||||
$cnt = mysql_num_rows($db_list);
|
||||
while ($i < $cnt) {
|
||||
while ($i < $cnt) {
|
||||
echo mysql_db_name($db_list, $i) . "\n";
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
|
@ -1420,7 +1420,7 @@ $link = mysql_connect('localhost', 'myname', 'secret');
|
|||
$fields = mysql_list_fields("database1", "table1", $link);
|
||||
$columns = mysql_num_fields($fields);
|
||||
|
||||
for ($i = 0; $i < $columns; $i++) {
|
||||
for ($i = 0; $i < $columns; $i++) {
|
||||
echo mysql_field_name($fields, $i) . "\n";;
|
||||
}
|
||||
</programlisting>
|
||||
|
|
|
@ -69,7 +69,7 @@ OCIExecute($stmt, OCI_DEFAULT);
|
|||
// for retrieve data use (after fetch):
|
||||
|
||||
$result = OCIResult($stmt, $n);
|
||||
if (is_object ($result)) $result = $result->load();
|
||||
if (is_object ($result)) $result = $result->load();
|
||||
|
||||
// For INSERT or UPDATE statement use:
|
||||
|
||||
|
@ -77,9 +77,9 @@ $sql = "insert into table (field1, field2) values (field1 = 'value',
|
|||
field2 = empty_clob()) returning field2 into :field2";
|
||||
OCIParse($conn, $sql);
|
||||
$clob = OCINewDescriptor($conn, OCI_D_LOB);
|
||||
OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB);
|
||||
OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB);
|
||||
OCIExecute($stmt, OCI_DEFAULT);
|
||||
$clob->save ("some text");
|
||||
$clob->save ("some text");
|
||||
|
||||
?>
|
||||
</programlisting>
|
||||
|
|
|
@ -356,10 +356,10 @@ if ($conn!=0) {
|
|||
$res=ovrimos_exec ($conn,"select table_id, table_name from sys.tables");
|
||||
if ($res != 0) {
|
||||
echo "Statement ok!";
|
||||
if (ovrimos_fetch_into ($res, &$row)) {
|
||||
if (ovrimos_fetch_into ($res, &$row)) {
|
||||
list ($table_id, $table_name) = $row;
|
||||
echo "table_id=".$table_id.", table_name=".$table_name."\n";
|
||||
if (ovrimos_fetch_into ($res, &$row)) {
|
||||
if (ovrimos_fetch_into ($res, &$row)) {
|
||||
list ($table_id, $table_name) = $row;
|
||||
echo "table_id=".$table_id.", table_name=".$table_name."\n";
|
||||
} else {
|
||||
|
@ -540,7 +540,7 @@ if ($conn != 0) {
|
|||
echo "Statement ok! cursor=".ovrimos_cursor ($res)."\n";
|
||||
$colnb = ovrimos_num_fields ($res);
|
||||
echo "Output columns=".$colnb."\n";
|
||||
for ($i=1; $i<=$colnb; $i++) {
|
||||
for ($i=1; $i<=$colnb; $i++) {
|
||||
$name = ovrimos_field_name ($res, $i);
|
||||
$type = ovrimos_field_type ($res, $i);
|
||||
$len = ovrimos_field_len ($res, $i);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<title><function>Readline</function></title>
|
||||
<programlisting role="php">
|
||||
//get 3 commands from user
|
||||
for ($i=0; $i < 3; $i++) {
|
||||
for ($i=0; $i < 3; $i++) {
|
||||
$line = readline ("Command: ");
|
||||
readline_add_history ($line);
|
||||
}
|
||||
|
|
|
@ -805,7 +805,7 @@ if (sesam_connect ("mycatalog", "myschema", "otto")) {
|
|||
<?php
|
||||
if (sesam_connect ("mycatalog", "myschema", "otto")) {
|
||||
if (sesam_execimm ("INSERT INTO mytable VALUES (*, 'Small Test', <0, 8, 15>)")
|
||||
&& sesam_execimm ("INSERT INTO othertable VALUES (*, 'Another Test', 1)"))
|
||||
&& sesam_execimm ("INSERT INTO othertable VALUES (*, 'Another Test', 1)"))
|
||||
sesam_commit();
|
||||
else
|
||||
sesam_rollback();
|
||||
|
@ -1852,7 +1852,7 @@ if (!$result) {
|
|||
}
|
||||
// print the table:
|
||||
print "<TABLE BORDER>\n";
|
||||
while (($row = sesam_fetch_array ($result)) && count ($row) > 0) {
|
||||
while (($row = sesam_fetch_array ($result)) && count ($row) > 0) {
|
||||
print " <TR>\n";
|
||||
print " <TD>".htmlspecialchars ($row["firstname"])."</TD>\n";
|
||||
print " <TD>".htmlspecialchars ($row["lastname"])."</TD>\n";
|
||||
|
|
|
@ -885,7 +885,7 @@ bar
|
|||
was called.
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
function foo(&$bar) {
|
||||
function foo(&$bar) {
|
||||
unset($bar);
|
||||
$bar = "blah";
|
||||
}
|
||||
|
@ -978,12 +978,12 @@ foo();
|
|||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<pre>
|
||||
<pre>
|
||||
<?php
|
||||
$a = array (1, 2, array ("a", "b", "c"));
|
||||
var_dump ($a);
|
||||
?>
|
||||
</pre>
|
||||
?>
|
||||
</pre>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue