vendredi 19 août 2022

Does youtube create folder for each channel?

I am implementing a channel system on my website. I have all the channel related information stored in a database and when someone clicks on a channel I do something like this: www.website.com/channel?id=4. Upon loading the channel.php, I use PHP to retrieve all the variables and necessary files.

I noticed many video hosting sites with channels have their url look like something like this: www.website.com/channel/channelname. Upon interacting on that page, the url then looks like www.website.com/channel/channelname/playlist when I click the playlist tab.

  1. Do these sites create folders per channel/user?
  2. Does that mean each channel/user has an autogenerated file called (in the example above) playlist.php?
  3. How can I set the url www.website.com/channel/channelname to load the index in that folder?
  4. In question 2, rather than having the playlist.php file in each and every single channel folder, somehow access playlist.php while not creating a folder. How can I make a template file rather than creating many instances of the file?
  5. Is there a way to make the URL appear as www.website.com/channel/channelname without creating the folder channelname?

Aucun commentaire:

Enregistrer un commentaire