mirror of
https://github.com/php/doc-it.git
synced 2026-04-23 23:38:18 +02:00
64474054d2
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314543 c90b9560-bf6c-de11-be94-00142212c4b1
76 lines
2.4 KiB
XML
76 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- splitted from ./it/functions/filesystem.xml, last change in rev 1.15 -->
|
|
<!-- last change to 'basename' in en/ tree in rev 1.2 -->
|
|
<!-- EN-Revision: n/a Maintainer: fernando Status: working -->
|
|
<!-- CREDITS: cortesi -->
|
|
<!-- OLD-Revision: 1.134/EN.1.2 -->
|
|
<refentry xml:id="function.basename" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>basename</refname>
|
|
<refpurpose>Restituisce il nome del file dal percorso indicato</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>basename</methodname>
|
|
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>suffix</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Data una stringa contenente il percorso di un file, questa funzione
|
|
restituisce il nome del file.
|
|
Se il nome del file finisce in <parameter>suffix</parameter>
|
|
quest'ultimo verrà tagliato.
|
|
</para>
|
|
<para>
|
|
Su Windows, sia gli slash (<literal>/</literal>) che i backslash
|
|
(<literal>\</literal>) vengono utilizzati come carattere di separazione delle directory.
|
|
In altri ambienti, si usa solo lo slash semplice
|
|
(<literal>/</literal>).
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Esempio di <function>basename</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$path = "/home/httpd/html/index.php";
|
|
$file = basename($path); // la variabile $file contiene "index.php"
|
|
$file = basename($path,".php"); // la variabile $file contiene "index"
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Il parametro <parameter>suffix</parameter> è stato aggiunto in PHP 4.1.0.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
Vedere anche <function>dirname</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
|
|
-->
|