luk Thu May 23 17:07:57 2002 EDT
Modified files:
/phpdoc-cs/language control-structures.xml
Log:
Index: phpdoc-cs/language/control-structures.xml
diff -u phpdoc-cs/language/control-structures.xml:1.6
phpdoc-cs/language/control-structures.xml:1.7
--- phpdoc-cs/language/control-structures.xml:1.6 Thu May 9 17:15:33 2002
+++ phpdoc-cs/language/control-structures.xml Thu May 23 17:07:57 2002
@@ -1014,73 +1014,75 @@
</example>
</para>
<simpara>
- V�ce p��klad� -- viz dokumentace <function>include</function>.
+ Dal�� p��klady -- viz dokumentace <function>include</function>.
</simpara>
<note>
<simpara>
- Prior to PHP 4.0.2, the following applies: <function>require</function> will
- always attempt to read the target file, even if the line it's on never executes.
- The conditional statement won't affect <function>require</function>. However,
- if the line on which the <function>require</function> occurs is not executed,
- neither will any of the code in the target file be executed. Similarly, looping
- structures do not affect the behaviour of <function>require</function>. Although
- the code contained in the target file is still subject to the loop, the
- <function>require</function> itself happens only once.
+ U verz� p�ed PHP 4.0.2 plat� toto: <function>require</function> se v�dy
+ pokus� p�e��st p��slu�n� soubor, krom� p��padu, �e se ��dek s t�mto
+ p��kazem nem��e nikdy prov�st. Podm�n�n� v�raz
+ <function>require</function> neovliv�uje. Av�ak pokud se ��dek, na kter�m
+ <function>require</function> le��, v�bec neprov�d�, nebude se prov�d�t
+ ani k�d v p��slu�n�m souboru. Podobn� je tomu i v p��pad� cykl� -- ani
+ ty neovliv�uj� chov�n� <function>require</function>. P�esto�e k�d
+ obsa�en� ve vkl�dan�m souboru je st�le p�edm�tem opakov�n�, samotn�
+ <function>require</function> se provede pouze jednou.
</simpara>
</note>
<simpara>
- See also <function>include</function>, <function>require_once</function>,
+ Viz tak� <function>include</function>, <function>require_once</function>,
<function>include_once</function>, <function>eval</function>,
<function>file</function>, <function>readfile</function>,
- <function>virtual</function> and <link
linkend="ini.include-path">include_path</link>.
+ <function>virtual</function> a <link
+linkend="ini.include-path">include_path</link>.
</simpara>
</sect1>
<sect1 id="function.include">
<title><function>include</function></title>
<simpara>
- The <function>include</function> statement includes and evaluates
- the specified file.
+ Konstrukt <function>include</function> vlo�� a ohodnot� specifikovan�
+ soubor.
</simpara>
<simpara>
- The documentation below also applies to <function>require</function>.
- The two constructs are identical in every way except how they handle
- failure. <function>include</function> produces a
- <link linkend="internal.e-warning">Warning</link> while
<function>require</function>
- results in a <link linkend="internal.e-error">Fatal Error</link>.
- In other words, use <function>require</function> if you want
- a missing file to halt processing of the page. <function>include</function>
does
- not behave this way, the script will continue regardless. Be sure to have an
- appropriate <link linkend="ini.include-path">include_path</link> setting as well.
+ N��e popsan� plat� i pro <function>require</function>. Tyto dva konstrukty
+ jsou zcela toto�n�, krom� toho, jak zpracov�vaj� chyby.
+ <function>include</function> produkuje
+ <link linkend="internal.e-warning">Warning</link> (varov�n�), zat�mco
+ <function>require</function> skon�� s chybou typu
+ <link linkend="internal.e-error">Fatal Error</link>.
+ Jin�mi slovy, <function>require</function> pou�ijte tehdy, chcete-li,
+ aby se p�i chyb�j�c�m souboru zastavilo zpracov�v�n�.
+ <function>include</function> se tak nechov�, skript bude neru�en�
+ pokra�ovat. Ujist�te se tak�, �e m�te v po��dku nastaven�
+ <link linkend="ini.include-path">include_path</link>.
</simpara>
<simpara>
- When a file is included, the code it contains inherits the
- <link linkend="language.variables.scope">variable scope</link> of the
- line on which the include occurs. Any variables available at that line
- in the calling file will be available within the called file, from that
- point forward.
+ Pokud se vlo�� soubor, potom k�d v n�m obsa�en� d�d�
+ <link linkend="language.variables.scope">kontext prom�nn�</link>
+ ��dku, kde byl vlo�en. V�echny prom�nn� dostupn� na tomto ��dku
+ volaj�c�ho souboru budou (od t�to chv�le) dostupn� i ve volan�m souboru.
</simpara>
<para>
<example>
- <title>Basic <function>include</function> example</title>
+ <title>Z�kladn� p��klad -- <function>include</function></title>
<programlisting role="php">
<![CDATA[
vars.php
<?php
-$color = 'green';
-$fruit = 'apple';
+$color = 'zelen�';
+$fruit = 'jablko';
?>
test.php
<?php
-echo "A $color $fruit"; // A
+echo "Vid�m $color $fruit"; // Vid�m
include 'vars.php';
-echo "A $color $fruit"; // A green apple
+echo "Vid�m $color $fruit"; // Vid�m zelen� jablko
?>
]]>
@@ -1088,14 +1090,13 @@
</example>
</para>
<simpara>
- If the include occurs inside a function within the calling file,
- then all of the code contained in the called file will behave as
- though it had been defined inside that function. So, it will follow
- the variable scope of that function.
+ Pokud ke vlo�en� dojde uvnit� funkce ve volaj�c�m souboru, potom se v�echen
+ k�d obsa�en� ve volan�m souboru bude chovat, jako by byl definov�n
+ uvnit� t�to funkce -- tedy v r�mci kontextu prom�nn�ch funkce.
</simpara>
<para>
<example>
- <title>Including within functions</title>
+ <title>Vkl�d�n� uvnit� funkc�</title>
<programlisting role="php">
<![CDATA[
<?php