mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added an example; moved the windows share information to a note;
See also is_readable(), is_writable(), is_file(), and file(). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@100093 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
762d3cbf9a
commit
beb88e3da0
1 changed files with 31 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.file-exists">
|
||||
<refnamediv>
|
||||
|
@ -25,11 +25,36 @@
|
|||
The results of this function are cached. See
|
||||
<function>clearstatcache</function> for more details.
|
||||
</simpara>
|
||||
<simpara>
|
||||
On windows use "//computername/share/filename" or
|
||||
"\\\\computername\share\filename" to check files on
|
||||
network shares.
|
||||
</simpara>
|
||||
<note>
|
||||
<title>Using Windows shares</title>
|
||||
<para>
|
||||
On windows, use <filename>//computername/share/filename</filename> or
|
||||
<filename>\\\\computername\share\filename</filename> to check files on
|
||||
network shares.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<example>
|
||||
<title>Testing whether a file exists</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$filename = '/path/to/foo.txt';
|
||||
|
||||
if (file_exists($filename)) {
|
||||
print "The file $filename exists";
|
||||
} else {
|
||||
print "The file $filename does not exist";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>is_readable</function>, <function>is_writable</function>,
|
||||
<function>is_file</function> and <function>file</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue