How To Get the Directory Name out of a File Path Name
How To Get the Directory Name out of a File Path Name? - PHP Script Tips - Working with Directoris and Files
If you have the full path name of a file, and want to get the directory name portion of the path name, you can use the dirname() function. It breaks the full path name at the last directory path delimiter (/) or (\), and returns the first portion as the directory name. Here is a PHP script example on how to use dirname():
<?php $pathName = "/temp/download/todo.txt"; $dirName = dirname($pathName); print("File full path name: $pathName\n"); print("File directory name: $dirName\n"); print("\n"); ?>
This script will print:
File full path name: /temp/download/todo.txt File directory name: /temp/download
2007-04-23, 4430👍, 0💬
Can you explain Forms authentication in detail ? In old ASP if you where said to create a login page...
How To Enter Binary Numbers in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want...
Can each Java object keep track of all the threads that want to exclusively access to it?
Can one change the mouse pointer in Forms? The SET_APPLICATION_PROPERTY build-in in Oracle Forms all...
What Is Posting? Posting is an event that writes Inserts, Updates and Deletes in the forms to the da...