


Installation of XAMMP in MAC environment and what needs to be paid attention to
The content of this article is about how to install XAMMP under MAC and what needs to be paid attention to. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Background knowledge:
xampp is a multi-platform PHP integrated environment installation package, where a represents Apache, m represents Mysql, and p represents PHP and Perl. This article will introduce the installation of xampp under the mac platform and the download of XAMMP multi-platform.
1. Download the dmg installation package and double-click to install.
2. After installation, enter localhost to run, which means the installation is successful. The XAMPP folder can be found in the application. The internal file structure is as follows
3. Next, configure the virtual host. First open httpd.conf in the etc directory and modify it as follows :
<Directory /> #AllowOverride none #Require all denied #注视掉上面两句,添加如下两句 Order deny,allow Allow from all </Directory> #htdocs相当于web的目录,要运行的web项目都是要放在htdocs中才能运行的 #这里我们修改这个目录到桌面的www目录 #DocumentRoot "/Application/XAMPP/htdocs" DocumentRoot "/Users/weixin/Desktop/www" #同理修改目录到桌面的www目录 #<Directory "/Application/XAMPP/htdocs"> <Directory "/Users/weixin/Desktop/www"> Options Indexes FollowSymLinks ExecCGI Includes AllowOverride All Require all granted #增加下面两句话 Order deny,allow Allow from all </Directory> #找到vhosts # Virtual hosts # Include etc/extra/httpd-vhosts.conf 去掉前面的# #至此httpd配置文件修改完成
4. Regarding the usage of Order deny and allow, you can view this blog post: Click here to view
5. Next, open the httpd-vhosts.conf file in the extra directory under etc , modify as follows:
<VirtualHost *:80> #ServerAdmin webmaster@dummy-host.example.com #DocumentRoot用来设置当前这个虚拟主机指向的项目地址, #我在www目录下创建了一个test目录,用来做测试,因此当前这个虚拟主机指向这个test目录 #DocumentRoot "/Application/XAMPP/htdocs" DocumentRoot "/Users/weixin/Desktop/www/test" #ServerName用来这是域名,这里可以随便取 #ServerName dummy-host2.example.com ServerName test.cn #ServerAlias test.cn #一般后面的两句无须改动 ErrorLog "logs/dummy-host.example.com-error.log" CustomLog "logs/dummy-host.example.com-access.log" common </VirtualHost> 至此,我们设置了test.cn这个域名指向桌面www目录下的test目录
6. Hold down the command space, enter /private/etc/, press Enter to enter the etc directory, find the hosts file, drag it to the desktop, make the following modifications, and drag it back again etc directory:
127.0.0.1 test.cn #注意test.cn这个值,需要和第五步中设置的域名对应
7. Create a new index.php file in the test directory and enter:
<?php phpinfo();
8. After restarting apache, when accessing test.cn, the following error will generally appear:
9. According to the above configuration, it can generally run smoothly under the windows platform, but there is one more place that needs to be modified under max. Open the httpd file and modify it as follows:
#修改用户名,修改为当前使用者的用户名 #User daemon User weixin #修改组,这里只需要把它注释就好 #Group daemon
10. Restart apache and visit test.cn again:
11. At this point, we have successfully configured XAMPP under mac. After that, we can write PHP code. Go to the www directory on your desktop
The above is the detailed content of Installation of XAMMP in MAC environment and what needs to be paid attention to. For more information, please follow other related articles on the PHP Chinese website!

SlicingaPythonlistisdoneusingthesyntaxlist[start:stop:step].Here'showitworks:1)Startistheindexofthefirstelementtoinclude.2)Stopistheindexofthefirstelementtoexclude.3)Stepistheincrementbetweenelements.It'susefulforextractingportionsoflistsandcanuseneg

NumPyallowsforvariousoperationsonarrays:1)Basicarithmeticlikeaddition,subtraction,multiplication,anddivision;2)Advancedoperationssuchasmatrixmultiplication;3)Element-wiseoperationswithoutexplicitloops;4)Arrayindexingandslicingfordatamanipulation;5)Ag

ArraysinPython,particularlythroughNumPyandPandas,areessentialfordataanalysis,offeringspeedandefficiency.1)NumPyarraysenableefficienthandlingoflargedatasetsandcomplexoperationslikemovingaverages.2)PandasextendsNumPy'scapabilitieswithDataFramesforstruc

ListsandNumPyarraysinPythonhavedifferentmemoryfootprints:listsaremoreflexiblebutlessmemory-efficient,whileNumPyarraysareoptimizedfornumericaldata.1)Listsstorereferencestoobjects,withoverheadaround64byteson64-bitsystems.2)NumPyarraysstoredatacontiguou

ToensurePythonscriptsbehavecorrectlyacrossdevelopment,staging,andproduction,usethesestrategies:1)Environmentvariablesforsimplesettings,2)Configurationfilesforcomplexsetups,and3)Dynamicloadingforadaptability.Eachmethodoffersuniquebenefitsandrequiresca

The basic syntax for Python list slicing is list[start:stop:step]. 1.start is the first element index included, 2.stop is the first element index excluded, and 3.step determines the step size between elements. Slices are not only used to extract data, but also to modify and invert lists.

Listsoutperformarraysin:1)dynamicsizingandfrequentinsertions/deletions,2)storingheterogeneousdata,and3)memoryefficiencyforsparsedata,butmayhaveslightperformancecostsincertainoperations.

ToconvertaPythonarraytoalist,usethelist()constructororageneratorexpression.1)Importthearraymoduleandcreateanarray.2)Uselist(arr)or[xforxinarr]toconvertittoalist,consideringperformanceandmemoryefficiencyforlargedatasets.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Linux new version
SublimeText3 Linux latest version

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
