Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Rename directory after install



Threaded Mode | Print  

 Rename directory after install (3 Replies, Read 1732 times)
earthgirlhosting
Group: Member
Post Group: Newbie
Posts: 12
Status:
With a custom script, I am uploading the /admin directory and configuring files within it, but I want to rename it to ['cp_username'] after the installation is complete.

Would you provide me with that syntax?

Thank you!

IP: --   

Rename directory after install
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5640
Status:
Hi,

You can try this :
PHP Code

 global $softpanel;
$__settings['admin_folder'] = $softpanel->user['name'];
srename($__settings['softpath'].'/admin/',  $__settings['softpath'].'/'.$__settings['admin_folder'].'/'); 



-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

Rename directory after install
earthgirlhosting
Group: Member
Post Group: Newbie
Posts: 12
Status:
Thanks, support did reply with that same answer. It didn't work, but the following code did:

Code

@srename($__settings['softpath'].'/admin/', $__settings['softpath'].'/'.$softpanel->user['name'].'/');

IP: --   

Rename directory after install
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5640
Status:
Hi,

I am not sure why the above code would not work as it was just the same with using a variable.

Anyways glad to know you were able to get it working.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 28, 2024, 5:07 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.338