So I am very new to this all but I want to learn. I have downloaded MAMP for windows, and ran it. It greenlights mysql and apache. I thought at this point I would have able to open .php files locally and get a desired display but instead it still shows up as hard code. Am I skipping steps?
Asked
Active
Viewed 1,766 times
0
-
1`MAMP` for MS-Windows? Has the world gone totally nuts? EDIT: ok, seems this really exists. _Why? Just why?_. – arkascha Apr 08 '17 at 19:53
-
Lol I was waiting for that response. So anyway yes. It exists and I have it. Should I just... you know... not have it. and have something else? Or try to get this to work anyway. – Wynx Apr 08 '17 at 19:57
-
I am afraid with that little information you gave no one will be able to help. You ask: "Am I skipping steps?"... But you do not say at all what steps you performed... – arkascha Apr 08 '17 at 19:58
-
My suggestion: 1. look into your apache http servers error log file (which you have to monitor constantly anyway when implementing php in a web environment) and 2. check your apache http servers php configuration. – arkascha Apr 08 '17 at 19:59
-
1running as `http://localhost` or as `file:///`? big difference here @Wynx `.php` or `.html`? – Funk Forty Niner Apr 08 '17 at 19:59
-
@Fred-ii- As always: a very good idea ;-) Though the term "running" cringles my toe nails... – arkascha Apr 08 '17 at 20:00
-
Lol unfortunately I did list all my steps. – Wynx Apr 08 '17 at 20:00
-
@arkascha having a green light everywhere is fine but we don't know what they're doing as I pointed out in my earlier comment. – Funk Forty Niner Apr 08 '17 at 20:01
-
1I was trying to view my pages as file:// – Wynx Apr 08 '17 at 20:02
-
@Fred-ii- Absolutely correct. Though I still wonder why green lights are so important when operating server side logic... Maybe just to make people think they are the ones with the green light sabers... – arkascha Apr 08 '17 at 20:02
-
In my mamp preferences, on the web server tab, it says document root: C:\MAMP\htdocs. – Wynx Apr 08 '17 at 20:02
-
1@Wynx that's what I thought and I closed the question with a duplicate for it. – Funk Forty Niner Apr 08 '17 at 20:02
-
@arkascha ^ wink – Funk Forty Niner Apr 08 '17 at 20:02
-
@arkascha yeah I know. colors can be deceiving ;-) it's how we perceive that sets them apart. – Funk Forty Niner Apr 08 '17 at 20:04
-
@Fred-ii- Except in case of color blindness... – arkascha Apr 08 '17 at 20:04
-
@arkascha which is what I meant; you read between those lines quite well ;-) – Funk Forty Niner Apr 08 '17 at 20:05
-
@Fred-ii- Hm, sorry, Sir, you apparently confuse me with someone else. I do not know how to read. – arkascha Apr 08 '17 at 20:05
2 Answers
2
You have to put your php project's folder or simple php files inside
C:\mamp\htdocs\your_project_folder
or single file program
C:\mamp\htdocs\simple_program.php
and start the Apache Server using MAMP Control Panel
In Browser visit:
For Full Project
localhost/your_project_folder/index[.php, .html]
or for simple single file php programs located at htdocs\your_program.php
localhost/your_program.php
You can put PHP or HTML files inside htdocs
folder ans then you can access them by localhost.

Hiren
- 613
- 1
- 8
- 25
0
This might happen due to several reasons, you should check this answer https://stackoverflow.com/a/5121589/7838027
-
-
-
@arkascha I can't put comments to question for some reason, maybe because I am a new member :/ – Оzgur Apr 08 '17 at 20:04