Add an example on how realpath() works on windows

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@253392 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2008-02-21 11:46:28 +00:00
parent dd8ef29981
commit 81534059fc

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<!-- $Revision: 1.13 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.realpath">
<refnamediv>
<refname>realpath</refname>
@ -67,6 +67,26 @@ echo realpath('./../../etc/passwd');
<screen>
<![CDATA[
/etc/passwd
]]>
</screen>
</example>
<example>
<title><function>realpath</function> on Windows</title>
<para>
On windows <function>realpath</function> will change unix style paths to
windows style.
</para>
<programlisting role="php">
<![CDATA[
<?php
echo realpath('/windows/system32');
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
C:\WINDOWS\System32
]]>
</screen>
</example>