If I change the site name, I want the folder name to change, how can I do that? i think this is changing the filename
$OldNameFolder=$path.$OldName;
$NewNameFolder=$path.$NewName;
rename('$OldNameFolder','$NewNameFolder');
CodePudding user response:
Don't enclose a variable as PHP will just think it's a string... So next time you should check if it's a variable before putting it in quotes :)
CodePudding user response:
Try remove variables in string
rename($OldNameFolder,$NewNameFolder);