I am new in PHP I am trying to create a subfolder to subdomain.
For example:
http://demo.com/subfolder
to
http://subfolder.demo.com
any one help to create this function in php.
I am new in PHP I am trying to create a subfolder to subdomain.
For example:
http://demo.com/subfolder
to
http://subfolder.demo.com
any one help to create this function in php.
Create a subfolder in www folder and then create a sub domain using cpanel and set root path to created folder. I don't think there is any role of function.php.
That's not done through PHP itself. You'd have to configure that on in your hosting panel where the application is hosted.
Try Googling for the hostingpanel you're using (might be something like DirectAdmin or cPanel). There are loads of guides on how to setup subdomains.
Also don't forget to change the DNS. Not all DNS-servers automatically tunnel through subdomains.
Best of luck!