Results 1 to 3 of 3

Thread: [RESOLVED] Trying to setup PHP server to run local website

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2024
    Posts
    5

    Resolved [RESOLVED] Trying to setup PHP server to run local website

    I have a simple PHP script in my webpage that just displays a message. Problem is...when I click the button to display the message, it displays the PHP code on the web page instead and I'm pretty sure that's because my PHP server is local. I don't think I have it configured properly to host locally. I downloaded XAMPP to handle this but I'm not sure what I need to do as far as configuring it. Ideas???

    I have copied my project directory into C:\XAMPP\htdocs directory.

    Thanks

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,960

    Re: Trying to setup PHP server to run local website

    After installing XAMPP you need to move your website to where the server's "listening" to. By default it will probably be in C:/xampp/htdocs. So if your website name is "MyWebsite" and you drag that directory to the htdocs directory, startup the XAMPP server, and navigate to localhost/MyWebsite/MyPage.html then click on the button, the actual PHP code should execute.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2024
    Posts
    5

    Re: Trying to setup PHP server to run local website

    Yep, that worked! Thanks brother!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width