mirror of
https://github.com/php/doc-it.git
synced 2026-03-26 00:22:14 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314543 c90b9560-bf6c-de11-be94-00142212c4b1
91 lines
3.1 KiB
XML
91 lines
3.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 -->
|
|
<!-- EN-Revision: n/a Maintainer: fernando Status: working -->
|
|
<!-- CREDITS: cortesi -->
|
|
<refentry xml:id="function.pathinfo" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>pathinfo</refname>
|
|
<refpurpose>Restituisce informazioni su un percorso di file</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>pathinfo</methodname>
|
|
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pathinfo</function> restituisce un vettore associativo contenente
|
|
informazioni riguardo <parameter>path</parameter>. Nel vettore vegono riportati i seguenti
|
|
elementi:
|
|
<literal>dirname</literal>, <literal>basename</literal>
|
|
e <literal>extension</literal>.
|
|
</para>
|
|
<para> Si può specificare quali elementi vengano restituiti con parametri opzionali
|
|
<parameter>options</parameter>. E' composto da
|
|
<constant>PATHINFO_DIRNAME</constant>,
|
|
<constant>PATHINFO_BASENAME</constant> e
|
|
<constant>PATHINFO_EXTENSION</constant>. Assume per defalut la restituzione di tutti
|
|
gli elementi.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>pathinfo</function> Example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$path_parts = pathinfo('/www/htdocs/index.html');
|
|
echo $path_parts['dirname'], "\n";
|
|
echo $path_parts['basename'], "\n";
|
|
echo $path_parts['extension'], "\n";
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para> Produrrà:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
/www/htdocs
|
|
index.html
|
|
html
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Per informazioni su come recuperare il path corrente, leggere
|
|
la sezione su <link linkend="language.variables.predefined">
|
|
variabili riservate predefinite</link>.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
Vedere anche <function>dirname</function>,
|
|
<function>basename</function>,
|
|
<function>parse_url</function>
|
|
e <function>realpath</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:"~/.phpdoc/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
|
|
-->
|