We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffffea9 commit 962bc81Copy full SHA for 962bc81
utility/php/rename-extension.php
@@ -3,6 +3,10 @@ function renameExtension($dir, $oldExtension, $newExtension) {
3
// Set the path to the directory containing the files to rename
4
// $dir = "/path/to/directory/";
5
6
+ if (substr($dir, -1) !== '/'){
7
+ $dir .= '/';
8
+ }
9
+
10
// Open the directory
11
if ($handle = opendir($dir)) {
12
0 commit comments