How to create a localhost using XAMPP to run PHP code?
P粉419164700
2023-07-30 16:36:39
<p>I've done this but it doesn't work. </p><p>I have a localhost set up for my WordPress but every time I try to create a new localhost it doesn't let me have multiple localhosts. </p><p>Where did I go wrong? I use Visual Studio Code as my code editor, are there any specific settings I need to set? </p><p><br /></p>
First, you must be convinced that "localhost" works. Try searching for information about sockets and Apache virtual hosts, I believe this will help you.
Regarding your question...are you using Xampp? If so, you could try splitting multiple projects into different folders (all within httpdocs) so that the access method becomes localhost/proj-a and localhost/proj-b.
If you are using Docker, or really need a complete unique URL without folders... try setting up your Docker, Nginx, Apache or whatever startup tool you are using to start on the new port (note (live, 80 is the default port), so assuming your Docker will use port 8080, your access method will be localhost:8080.
If it's not clear yet, try reading my two suggestions and then provide more details, someone will definitely help you.