In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about how to configure the PHP development environment in Mac. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
Enable the Apache service
The PHP file we wrote needs to be run under Apache, but the Apache service is turned off by default in Mac, so we need to modify the configuration file:
The default installation path for Apache service is / private/etc/apache2, which belongs to the private directory of the system. Find and open the httpd.conf file in this directory
Vim http.conf
Search for # LoadModule php7_module libexec/apache2/libphp7.so and delete the previous #
You can start the Apache service
Sudo apachectl start
When starting for the first time, we can enter the http://localhost or http://127.0.0.1 URL in the browser to check whether the Apache service has started successfully. If the Apache service starts successfully, the page displays It works!
Commands about Apache Services start Apache Services sudo apachectl start View Apache Service version sudo apachectl-v close Apache Services sudo apachectl stop restart Apache Services sudo apachectl restartApache Project deployment Directory
The default deployment path for the Apache service is / Library/WebServer/Documents/, so our project needs to be placed under that path.
We can also create a new info.php test program under / Library/WebServer/Documents/.
Enter the following URL in the browser to view PHP-related information http://localhost/info.php
Of course, we can also modify the deployment path, find and open the httpd.conf file in the / private/etc/apache2 directory, search for Documentroot and modify the deployment path, and restart apache to take effect.
Port number modification
The Apache service port number defaults to 80. If you want to change the port number, you can find and open the httpd.conf file in the / private/etc/apache2 directory, search for Listen 80, and modify the port number.
This is how to configure the PHP development environment in the Mac shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.