Results 1 to 10 of 21
Hybrid View
-
7th Jan 2012, 06:46 PM #1OPMember
Nearly working 100% :
foreach (glob("$location*") as $thefolder) {
If (is_dir($thefolder)) {
rename($thefolder, str_replace(' ', '.', $thefolder));
$folderx = $thefolder;
break; // Breaks next loops since we only need 1
}
}
echo $folderx;
now the actual folder is renamed to The.Folder.X but $folderx is still returning = "/location/The Folder X"
viruz99 Reviewed by viruz99 on . [PHP] Get Folder Name In A Location Hey Guys , Any idea how to get a name of a folder via php . e.g : /...../location/folderx i don't have the name of the folderx , how can i get the folder name via php ? Rating: 5
-
7th Jan 2012, 10:40 PM #2MemberPHP Code:
foreach (glob("$location*") as $thefolder) {
if (is_dir($thefolder)) {
$folderx=str_replace(' ', '.', $thefolder)
rename($thefolder, $folderx);
break; // Breaks next loops since we only need 1
}
}
echo $folderx;
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Mass rar each folder
By Ruriko in forum Technical Help Desk SupportReplies: 1Last Post: 11th Aug 2012, 01:24 PM -
Problem with folder.
By sasa037 in forum Technical Help Desk SupportReplies: 4Last Post: 25th Dec 2011, 06:42 AM -
Track Folder Changes
By Daniel in forum Webmaster ResourcesReplies: 0Last Post: 3rd Nov 2011, 02:06 PM -
VPS Folder Permissions.
By Trueno22 in forum Server ManagementReplies: 8Last Post: 23rd Aug 2010, 09:59 PM -
[WTS] Database Folder.
By Luke in forum Completed TransactionsReplies: 3Last Post: 20th Sep 2009, 05:01 PM
themaCreator - create posts from...
Version 3.47 released. Open older version (or...