Where can I save my HTML and PHP files when I use a local server on my Mac (OS X 10.6 Snow Leopard)

I am learning PHP and MySQL and just setting up a local server on my Mac Snow Leopard. Different components work (PHP works, MySQL works with the terminal, and Apache is configured.

Where should I save my HTML and PHP files? Some sources say / users / [my username] / sites /. Other sources say / MacHD / Library / WebServer / Documents. Other sources say I should save my files in Apache folder? What is the correct answer?

Thank!

+5
source share
3 answers

The main http://localhost/webroot is in/MacHD/Library/WebServer/Documents

Folders Siteswill be available inhttp://localhost/~username/

Apache - (, MacPorts, Fink - .), , webroot, httpdocs htdocs .

- MAMP, , , , , YMMV.

+2

, , MAMP PRO , .

, , - , , , , Mac. phpmyadmin, mysql, php, apache - , .

Slomojo .

+1

MacOS 10.10.5 (Yosemite)

/Application/XAMPP/htdocs/ webroot

0

All Articles