<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>basename &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/basename/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Some PHP Tips: basename()</title>
		<link>/2010/10/04/some-php-tips-basename/</link>
		<comments>/2010/10/04/some-php-tips-basename/#respond</comments>
		<pubDate>Mon, 04 Oct 2010 16:38:13 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[basename]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">/?p=2014</guid>
		<description><![CDATA[Here&#8217;s a quick tip: I&#8217;ve an absolute file path &#8220;/var/www/html/index.php&#8221;, but I need only the file name &#8211; index.php. So how do I get it? basename There it is: $filename = basename('/var/www/html/index.php'); now $filename contains only &#8220;index.php&#8221;!<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/" rel="bookmark" title="PHP Strings: How to Get the Extension of a File">PHP Strings: How to Get the Extension of a File </a></li>
<li><a href="/2010/09/10/automatically-upload-images-with-php-directly-from-the-uri/" rel="bookmark" title="Automatically Upload Images with PHP Directly from the URI">Automatically Upload Images with PHP Directly from the URI </a></li>
<li><a href="/2010/09/03/the-better-way-to-unset-variables-in-php/" rel="bookmark" title="The Better Way to Unset Variables in PHP">The Better Way to Unset Variables in PHP </a></li>
<li><a href="/2011/08/17/php-fetch-get-as-string-with-http_build_query/" rel="bookmark" title="PHP: Fetch $_GET as String with http_build_query()">PHP: Fetch $_GET as String with http_build_query() </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a quick tip: I&#8217;ve an absolute file path &#8220;/var/www/html/index.php&#8221;, but I need only the file name &#8211; index.php. So how do I get it?</p>
<h2>basename</h2>
<p>There it is:</p>
<pre lang="php">
$filename = basename('/var/www/html/index.php');
</pre>
<p>now $filename contains only &#8220;index.php&#8221;!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/" rel="bookmark" title="PHP Strings: How to Get the Extension of a File">PHP Strings: How to Get the Extension of a File </a></li>
<li><a href="/2010/09/10/automatically-upload-images-with-php-directly-from-the-uri/" rel="bookmark" title="Automatically Upload Images with PHP Directly from the URI">Automatically Upload Images with PHP Directly from the URI </a></li>
<li><a href="/2010/09/03/the-better-way-to-unset-variables-in-php/" rel="bookmark" title="The Better Way to Unset Variables in PHP">The Better Way to Unset Variables in PHP </a></li>
<li><a href="/2011/08/17/php-fetch-get-as-string-with-http_build_query/" rel="bookmark" title="PHP: Fetch $_GET as String with http_build_query()">PHP: Fetch $_GET as String with http_build_query() </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/10/04/some-php-tips-basename/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
