0

I am somehow confused to analyse a project. Client says "I need an admin panel using PHP that create subdomain on wizard", i.e like he wants www.domain.com/sub1, www.domain.com/sub2, www.domain.com/sub3 etc. each sub domain may contain different header, menu, content, footer etc. I am really confused in "How do I make PHP admin panel that creates a directory and files for each subdomain?". I hope you got it, otherwise I am ready to discuss it more.

Thanks.

1
  • 2
    Those are not subdomains. That's easy to redirect with .htaccess to a php script using RewriteEngine. Commented Jul 31, 2012 at 10:55

2 Answers 2

1

Hope you have something on this:

http://php.net/manual/en/function.mkdir.php

http://php.net/manual/en/function.fwrite.php

Sign up to request clarification or add additional context in comments.

Comments

0

Why making a directory for each "domain"? You can use .htaccess and a database.

4 Comments

To keep it clean, you should always have different directories for each subdomain.
Ok, If I handle it with .htacess and DB, but then how would I create different header, footer, contents for each sub domain?
You can store the data inside the database with the name of the "domain" and then selecting the domain data and show inside the template
Ok, Thanks got some ideas though.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.