mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Changed print to echo as recommended in RFC/coding_standards
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@145979 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b4069f8cdd
commit
0599b66cc0
14 changed files with 65 additions and 65 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.list">
|
||||
<refnamediv>
|
||||
|
@ -66,10 +66,10 @@ print "I need $power!\n";
|
|||
|
||||
$result = mysql_query("SELECT id, name, salary FROM employees",$conn);
|
||||
while (list($id, $name, $salary) = mysql_fetch_row($result)) {
|
||||
print(" <tr>\n" .
|
||||
echo " <tr>\n" .
|
||||
" <td><a href=\"info.php?id=$id\">$name</a></td>\n" .
|
||||
" <td>$salary</td>\n" .
|
||||
" </tr>\n");
|
||||
" </tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/bzip2.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.bzcompress">
|
||||
<refnamediv>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<?php
|
||||
$str = "sample data";
|
||||
$bzstr = bzcompress($str, 9);
|
||||
print( $bzstr );
|
||||
echo $bzstr;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/bzip2.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.bzdecompress">
|
||||
<refnamediv>
|
||||
|
@ -32,14 +32,14 @@
|
|||
$start_str = "This is not an honest face?";
|
||||
$bzstr = bzcompress($start_str);
|
||||
|
||||
print( "Compressed String: " );
|
||||
print( $bzstr );
|
||||
print( "\n<br>\n" );
|
||||
echo "Compressed String: ";
|
||||
echo $bzstr;
|
||||
echo "\n<br>\n";
|
||||
|
||||
$str = bzdecompress($bzstr);
|
||||
print( "Decompressed String: " );
|
||||
print( $str );
|
||||
print( "\n<br>\n" );
|
||||
echo "Decompressed String: ";
|
||||
echo $str;
|
||||
echo "\n<br>\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/bzip2.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.bzopen">
|
||||
<refnamediv>
|
||||
|
@ -37,9 +37,9 @@ while (!feof($bz)) {
|
|||
}
|
||||
bzclose($bz);
|
||||
|
||||
print( "The contents of /tmp/foo.bz2 are: " );
|
||||
print( "\n<br>\n" );
|
||||
print( $decompressed_file );
|
||||
echo "The contents of /tmp/foo.bz2 are: ";
|
||||
echo "\n<br>\n";
|
||||
echo $decompressed_file;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/bzip2.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.bzread">
|
||||
<refnamediv>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<?php
|
||||
$bz = bzopen("/tmp/foo.bz2", "r");
|
||||
$str = bzread($bz, 2048);
|
||||
print( $str );
|
||||
echo $str;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.strftime">
|
||||
<refnamediv>
|
||||
|
@ -252,14 +252,14 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
setlocale (LC_TIME, "C");
|
||||
print (strftime ("%A in Finnish is "));
|
||||
setlocale (LC_TIME, "fi_FI");
|
||||
print (strftime ("%A, in French "));
|
||||
setlocale (LC_TIME, "fr_FR");
|
||||
print (strftime ("%A and in German "));
|
||||
setlocale (LC_TIME, "de_DE");
|
||||
print (strftime ("%A.\n"));
|
||||
setlocale(LC_TIME, "C");
|
||||
echo strftime("%A");
|
||||
setlocale(LC_TIME, "fi_FI");
|
||||
echo strftime(" in Finnish is %A,");
|
||||
setlocale(LC_TIME, "fr_FR");
|
||||
echo strftime(" in French %A and");
|
||||
setlocale(LC_TIME, "de_DE");
|
||||
echo strftime(" in German %A.\n");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -288,16 +288,16 @@ ISOWk M Tu W Thu F Sa Su
|
|||
3 13 14 15 16 17 18 19 */
|
||||
|
||||
// Outputs: 12/28/2002 - %V,%G,%Y = 52,2002,2002
|
||||
print "12/28/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/28/2002")) . "\n";
|
||||
echo "12/28/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/28/2002")) . "\n";
|
||||
|
||||
// Outputs: 12/30/2002 - %V,%G,%Y = 1,2003,2002
|
||||
print "12/30/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/30/2002")) . "\n";
|
||||
echo "12/30/2002 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/30/2002")) . "\n";
|
||||
|
||||
// Outputs: 1/3/2003 - %V,%G,%Y = 1,2003,2003
|
||||
print "1/3/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2003")) . "\n";
|
||||
echo "1/3/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2003")) . "\n";
|
||||
|
||||
// Outputs: 1/10/2003 - %V,%G,%Y = 2,2003,2003
|
||||
print "1/10/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/10/2003")) . "\n";
|
||||
echo "1/10/2003 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/10/2003")) . "\n";
|
||||
|
||||
|
||||
|
||||
|
@ -311,16 +311,16 @@ ISOWk M Tu W Thu F Sa Su
|
|||
2 10 11 12 13 14 15 16 */
|
||||
|
||||
// Outputs: 12/23/2004 - %V,%G,%Y = 52,2004,2004
|
||||
print "12/23/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/23/2004")) . "\n";
|
||||
echo "12/23/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/23/2004")) . "\n";
|
||||
|
||||
// Outputs: 12/31/2004 - %V,%G,%Y = 53,2004,2004
|
||||
print "12/31/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/31/2004")) . "\n";
|
||||
echo "12/31/2004 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("12/31/2004")) . "\n";
|
||||
|
||||
// Outputs: 1/2/2005 - %V,%G,%Y = 53,2004,2005
|
||||
print "1/2/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/2/2005")) . "\n";
|
||||
echo "1/2/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/2/2005")) . "\n";
|
||||
|
||||
// Outputs: 1/3/2005 - %V,%G,%Y = 1,2005,2005
|
||||
print "1/3/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2005")) . "\n";
|
||||
echo "1/3/2005 - %V,%G,%Y = " . strftime("%V,%G,%Y",strtotime("1/3/2005")) . "\n";
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/dbx.xml, last change in rev 1.3 -->
|
||||
<refentry id="function.dbx-close">
|
||||
<refnamediv>
|
||||
|
@ -23,7 +23,7 @@
|
|||
$link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password")
|
||||
or die ("Could not connect");
|
||||
|
||||
print("Connected successfully");
|
||||
echo "Connected successfully";
|
||||
dbx_close($link);
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/fbsql.xml, last change in rev 1.26 -->
|
||||
<refentry id="function.fbsql-create-db">
|
||||
<refnamediv>
|
||||
|
@ -29,7 +29,7 @@
|
|||
$link = fbsql_pconnect ("localhost", "_SYSTEM", "secret")
|
||||
or die ("Could not connect");
|
||||
if (fbsql_create_db ("my_db")) {
|
||||
print("Database created successfully\n");
|
||||
echo "Database created successfully\n";
|
||||
} else {
|
||||
printf("Error creating database: %s\n", fbsql_error ());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/imap.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.imap-createmailbox">
|
||||
<refnamediv>
|
||||
|
@ -49,12 +49,12 @@ echo "Newname will be '$name1'<br>\n";
|
|||
if(@imap_createmailbox($mbox,imap_utf7_encode("{your.imap.host}INBOX.$newname"))) {
|
||||
$status = @imap_status($mbox,"{your.imap.host}INBOX.$newname",SA_ALL);
|
||||
if($status) {
|
||||
print("your new mailbox '$name1' has the following status:<br>\n");
|
||||
print("Messages: ". $status->messages )."<br>\n";
|
||||
print("Recent: ". $status->recent )."<br>\n";
|
||||
print("Unseen: ". $status->unseen )."<br>\n";
|
||||
print("UIDnext: ". $status->uidnext )."<br>\n";
|
||||
print("UIDvalidity:". $status->uidvalidity)."<br>\n";
|
||||
echo "your new mailbox '$name1' has the following status:<br>\n";
|
||||
echo "Messages: ". $status->messages ."<br>\n";
|
||||
echo "Recent: ". $status->recent ."<br>\n";
|
||||
echo "Unseen: ". $status->unseen ."<br>\n";
|
||||
echo "UIDnext: ". $status->uidnext ."<br>\n";
|
||||
echo "UIDvalidity:". $status->uidvalidity ."<br>\n";
|
||||
|
||||
if(imap_renamemailbox($mbox,"{your.imap.host}INBOX.$newname","{your.imap.host}INBOX.$name2")) {
|
||||
echo "renamed new mailbox from '$name1' to '$name2'<br>\n";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/imap.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.imap-status">
|
||||
<refnamediv>
|
||||
|
@ -73,13 +73,13 @@ $mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
|
|||
|
||||
$status = imap_status($mbox,"{your.imap.host}INBOX",SA_ALL);
|
||||
if($status) {
|
||||
print("Messages: ". $status->messages )."<br>\n";
|
||||
print("Recent: ". $status->recent )."<br>\n";
|
||||
print("Unseen: ". $status->unseen )."<br>\n";
|
||||
print("UIDnext: ". $status->uidnext )."<br>\n";
|
||||
print("UIDvalidity:". $status->uidvalidity)."<br>\n";
|
||||
echo "Messages: ". $status->messages ."<br>\n";
|
||||
echo "Recent: ". $status->recent ."<br>\n";
|
||||
echo "Unseen: ". $status->unseen ."<br>\n";
|
||||
echo "UIDnext: ". $status->uidnext ."<br>\n";
|
||||
echo "UIDvalidity:". $status->uidvalidity ."<br>\n";
|
||||
} else
|
||||
print "imap_status failed: ".imap_last_error()."\n";
|
||||
echo "imap_status failed: ".imap_last_error()."\n";
|
||||
|
||||
imap_close($mbox);
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 -->
|
||||
<refentry id="function.pg-close">
|
||||
<refnamediv>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<?php
|
||||
$dbconn = pg_connect("host=localhost port=5432 dbname=mary")
|
||||
or die("Could not connect");
|
||||
print("Connected successfully");
|
||||
echo "Connected successfully";
|
||||
pg_close($dbconn);
|
||||
?>
|
||||
]]>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry id="function.pg-get-notify">
|
||||
<refnamediv>
|
||||
<refname>pg_get_notify</refname>
|
||||
|
@ -39,7 +39,7 @@ if (!$conn) {
|
|||
pg_query($conn, 'LISTEN author_updated;');
|
||||
$notify = pg_get_notify($conn);
|
||||
if (!$notify)
|
||||
print("No messages\n");
|
||||
echo "No messages\n";
|
||||
else
|
||||
print_r($notify);
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
|
||||
<refentry id="function.xslt-error">
|
||||
<refnamediv>
|
||||
|
@ -33,7 +33,7 @@ if (!$result) {
|
|||
xslt_errno($xh), xslt_error($xh)));
|
||||
}
|
||||
|
||||
print($result);
|
||||
echo $result;
|
||||
|
||||
xslt_free($xh);
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
|
||||
<refentry id="function.xslt-set-log">
|
||||
<refnamediv>
|
||||
|
@ -57,7 +57,7 @@ xslt_set_log($xh, true);
|
|||
xslt_set_log($xh, getcwd() . 'myfile.log');
|
||||
|
||||
$result = xslt_process($xh, 'dog.xml', 'pets.xsl');
|
||||
print($result);
|
||||
echo $result;
|
||||
|
||||
xslt_free($xh);
|
||||
?>
|
||||
|
@ -65,10 +65,10 @@ xslt_free($xh);
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<note>
|
||||
<simpara>
|
||||
Please note that <emphasis>file://</emphasis> is needed in front of path if you use Windows.
|
||||
</simpara>
|
||||
<note>
|
||||
<simpara>
|
||||
Please note that <emphasis>file://</emphasis> is needed in front of path if you use Windows.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue