cvs: phpdoc-sk /reference/filesystem/functions basename.xml chown.xml file-exists.xml file-get-contents.xml file.xml
[email protected] ("Robert Novotny")
| Newsgroups | php.doc.sk |
|---|---|
| Message-ID | <cvsnovotnyr1044031442@cvsserver> |
novotnyr Fri Jan 31 11:44:02 2003 EDT
Added files:
/phpdoc-sk/reference/filesystem/functions file-exists.xml
file-get-contents.xml
file.xml
Modified files:
/phpdoc-sk/reference/filesystem/functions basename.xml chown.xml
Log:
some new, some fixed
novotnyr-20030131114402.txt
(text/plain, 9.3 KB)
Index: phpdoc-sk/reference/filesystem/functions/basename.xml
diff -u phpdoc-sk/reference/filesystem/functions/basename.xml:1.1 phpdoc-sk/reference/filesystem/functions/basename.xml:1.2
--- phpdoc-sk/reference/filesystem/functions/basename.xml:1.1 Tue Jan 28 08:59:44 2003
+++ phpdoc-sk/reference/filesystem/functions/basename.xml Fri Jan 31 11:44:02 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-2"?>
-<!-- $Revision: 1.1 $ -->
+<!-- EN-Revision: 1.1 Maintainer: novotnyr Status: ready -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
<refentry id="function.basename">
<refnamediv>
@@ -39,7 +39,7 @@
</para>
<note>
<para>
- Parameter <parameter>suffix</parameter> bol pridaný v PHP 4.1.0.
+ Parameter <parameter>pripona</parameter> bol pridaný v PHP 4.1.0.
</para>
</note>
<para>
Index: phpdoc-sk/reference/filesystem/functions/chown.xml
diff -u phpdoc-sk/reference/filesystem/functions/chown.xml:1.1 phpdoc-sk/reference/filesystem/functions/chown.xml:1.2
--- phpdoc-sk/reference/filesystem/functions/chown.xml:1.1 Tue Jan 28 08:59:45 2003
+++ phpdoc-sk/reference/filesystem/functions/chown.xml Fri Jan 31 11:44:02 2003
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="iso-8859-2"?>
+<!-- $Revision: 1.2 $ -->
<!-- EN-Revision: 1.4 Maintainer: novotnyr Status: ready -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
<refentry id="function.chown">
@@ -22,7 +23,7 @@
&return.success;
</para>
<para>
- Pozri tie¾<function>chmod</function>.
+ Pozri tie¾ <function>chmod</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc-sk/reference/filesystem/functions/file-exists.xml
+++ phpdoc-sk/reference/filesystem/functions/file-exists.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.4 Maintainer: novotnyr Status: ready -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
<refentry id="function.file-exists">
<refnamediv>
<refname>file_exists</refname>
<refpurpose>Zistí, èi zadaný súbor existuje</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>bool</type><methodname>file_exists</methodname>
<methodparam><type>string</type><parameter>nazovsuboru</parameter></methodparam>
</methodsynopsis>
<simpara>
Vráti &true;, ak súbor zadaný jeho názvom v parametri
<parameter>nazovsuboru</parameter> existuje, inak vráti &false;.
</simpara>
<simpara>
Táto funkcia nepracuje so <link
linkend="features.remote-files">vzdialenými súbormi</link>; skúmaný súbor
musí by» dostupný cez súborový systém servera, na ktorom skript be¾í.
</simpara>
<simpara>
Výsledky tejto funkcie sú cacheované. Ïal¹ie informácie mô¾ete nájs» pri
funkcii <function>clearstatcache</function>.
</simpara>
<note>
<title>Pou¾ívanie zdieµaných súborov vo Windows</title>
<para>
Ak chcete zis»ova» existenciu zdieµaných súborov v systéme Windows, pou¾ite
ako názov súboru
<filename>//nazovpocitaca/share/nazovsuboru</filename> alebo
<filename>\\\\nazovpocitaca\share\nazovsuboru</filename>.
</para>
</note>
<para>
<example>
<title>Zistenie, èi súbor existuje</title>
<programlisting role="php">
<![CDATA[
<?php
$filename = '/cesta/k/suboru.txt';
if (file_exists($filename)) {
print "Súbor $filename existuje";
} else {
print "Súbor $filename neexistuje";
}
?>
]]>
</programlisting>
</example>
</para>
<para>
Pozri tie¾ <function>is_readable</function>, <function>is_writable</function>,
<function>is_file</function> a <function>file</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
Index: phpdoc-sk/reference/filesystem/functions/file-get-contents.xml
+++ phpdoc-sk/reference/filesystem/functions/file-get-contents.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.6 Maintainer: novotnyr Status: ready -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.130 -->
<refentry id="function.file-get-contents">
<refnamediv>
<refname>file_get_contents</refname>
<refpurpose>Naèíta celý súbor do re»azca</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>string</type><methodname>file_get_contents</methodname>
<methodparam><type>string</type><parameter>nazovsuboru</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>pouzivat_cesty_include</parameter></methodparam>
</methodsynopsis>
<para>
Táto funkcia je identická s funkciou <function>file</function>;
<function>file_get_contents</function> v¹ak vráti obsah naèítaného súboru ako re»azec.
</para>
¬e.bin-safe;
&tip.fopen-wrapper;
<simpara>
Pozri tie¾: <function>fgets</function>, <function>file</function>,
<function>fread</function>, <function>include</function>
a <function>readfile</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
Index: phpdoc-sk/reference/filesystem/functions/file.xml
+++ phpdoc-sk/reference/filesystem/functions/file.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- EN-Revision: 1.7 Maintainer: novotnyr Status: ready -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
<refentry id="function.file">
<refnamediv>
<refname>file</refname>
<refpurpose>Naèíta obsah súboru do poµa</refpurpose>
</refnamediv>
<refsect1>
<title>Popis</title>
<methodsynopsis>
<type>array</type><methodname>file</methodname>
<methodparam><type>string</type><parameter>nazovsuboru</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>pouzivat_cesty_include</parameter></methodparam>
</methodsynopsis>
<para>
Táto funkcia je identická s funkciou <function>readfile</function>, av¹ak
<function>file</function> vráti obsah naèítaného súboru ako pole. Ka¾dý
prvok poµa zodpovedá jednému riadku v súbore, prièom obsahuje aj
znak konca riadku. Pri chybe vráti funkcia <function>file</function>
&false;.
</para>
<note>
<para>
Ka¾dý riadok vo výslednom poli bude obsahova» znak konca riadka, èi¾e
ak konce riadkov nie sú ¾iadúce, treba na ich odstránenie pou¾i»
funkciu <function>trim</function>.
</para>
</note>
¬e.line-endings;
<para>
Voliteµný parameter <parameter>pouzivat_cesty_include</parameter> je
vhodné pou¾i» a nastavi» na hodnotu, ak chcete hµada» po¾adovaný súbor aj v
ceste <link linkend="ini.include-path">include_path</link>.
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// Naèíta obsah súboru do poµa. V tomto prípade pou¾ijeme protokol HTTP na
// naèítanie HTML zdroja zadaného pomocou URL.
$lines = file ('http://www.adresa.com/');
// Iterujme na¹e pole, zobrazme HTML zdroj ako HTML zdroj a pridajme naviac
// èísla riadkov.
foreach ($lines as $line_num => $line) {
echo "Riadok è. <b>{$line_num}</b> : " . htmlspecialchars($line) . "<br>\n";
}
// Ïal¹í príklad - naèítajme internetovú stránku do re»azca. Pozri tie¾ file_get_contents().
$html = implode ('', file ('http://www.adresa.com/'));
?>
]]>
</programlisting>
</informalexample>
</para>
<note>
<para>
Od verzie PHP 4.3.0 mô¾ete pou¾íva» funkciu <function>file_get_contents</function> na
naèítanie obsahu súboru do re»azca.
</para>
<para>
Od PHP 4.3.0 pracuje funkcia <function>file</function> správne aj s binárnymi súbormi.
</para>
</note>
&tip.fopen-wrapper;
<para>
Pozri tie¾ <function>readfile</function>,
<function>fopen</function>, <function>fsockopen</function>,
<function>popen</function>, <function>file_get_contents</function>
a <function>include</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->