wiesemann Sat Jan 4 08:29:23 2003 EDT
Modified files:
/phpdoc/en/faq using.xml
Log:
added link to return function, typo fix, added note on array $_SERVER
Index: phpdoc/en/faq/using.xml
diff -u phpdoc/en/faq/using.xml:1.19 phpdoc/en/faq/using.xml:1.20
--- phpdoc/en/faq/using.xml:1.19 Sun Jun 16 03:11:00 2002
+++ phpdoc/en/faq/using.xml Sat Jan 4 08:29:22 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.19 $ -->
+<!-- $Revision: 1.20 $ -->
<chapter id="faq.using">
<title>Using PHP</title>
<titleabbrev>Using PHP</titleabbrev>
@@ -78,7 +78,7 @@
<para>
To be able to use the results of your function in an expression (such
as concatenating it with other strings in the example above), you need
- to <emphasis>return</emphasis> the value, not <function>echo</function>
+ to <function>return</function> the value, not <function>echo</function>
it.
</para>
</answer>
@@ -278,8 +278,16 @@
Environment variables are normal global variables, so you must
either declare them as global variables in your function (by using
"<literal>global $DOCUMENT_ROOT;</literal>", for example) or by using
- the global variable array (ie, "<literal>$GLOBALS["DOCUMENT_ROOT"]</literal>".
+ the global variable array (ie, "<literal>$GLOBALS["DOCUMENT_ROOT"]</literal>").
</para>
+ <note>
+ <para>
+ Since PHP 4.1.0 you can also use the superglobal array
+ <literal>$_SERVER</literal> which is available in every function.
+ For example, you can now use <literal>$_SERVER["DOCUMENT_ROOT"]</literal>
+ instead of <literal>$DOCUMENT_ROOT</literal>.
+ </para>
+ </note>
</answer>
</qandaentry>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php