user5740195
user5740195

Reputation:

Run html file that has associated php file on mac

I am making a contact us page for a website. I have the html page defining all the input criteria such as name, email and message. This html file links to a php file to send the information that the user types into the message box.

my problem is that I cannot test if sending the message will work as I think the php file needs to to be run through a server. How can i test if the file works on my mac?

Upvotes: 0

Views: 161

Answers (2)

timbartels
timbartels

Reputation: 70

You should put your .php file in the htdocs folder of MAMP or XAMP. After that you must copy your file path in your browser. Replace everything up to and including htdocs with your localhost. For example: If my file is in Users/Documents/MAMP/htdocs/index.php it should be like localhost:8888/index.php

Upvotes: 2

MRustamzade
MRustamzade

Reputation: 1455

You can download mamp or xamp and install server on your mac. Then you can test your all php files.

Upvotes: 0

Related Questions