PHP环境搭建工具
一直使用XAMPP搭建本地PHP环境,之前还介绍过本地XAMPP搭建和安装Wordpress和如何让本地XAMPP支持Rewrite重 定向,但最近我的XAMPP出现很多灵异现象,先是每次安装后用上一两天页面就会变成500,卸载重装甚至重装系统又全新安装都无法启动Apache和 Mysql(非端口问题)。于是寻找一些其它PHP本地环境搭建工具。
7款本地PHP环境搭建工具
1. XAMPP
XAMPP是一款比较强大的本地测试平台,它集成了必须的三个功能,还带有 FileZilla,软件带有一个控制面板,在里面可以把Apache、MySql和FileZilla三者注册为系统服务或者卸载服务,有服务启动的控 制按钮,而且在窗口下部还能看到服务的运行信息。虽说面板是英文的,但清楚易懂。注册为系统服务有个好处就是开机能够自动运行,但是会消耗一定的系统资 源,怎么取舍用户自己来定。安装成功,服务也启动成功后,就可以把浏览器打开输入http://localhost/,试试是否成功。在XAMPP的网页 选项里,有中文支持。
2. Wamp Server
它的官方网站没有中文,但是程序支持中文。启动安装程序后,它会提示你请先卸载旧版,不支持 覆盖式的升级,然后一路NEXT就能安装成功。它在任务托盘里有个图标,如果服务启动异常,它就是红色的;如果部分异常,它就变成黄色;如果是一切正常, 那么它就变成了白色。这些不同的颜色警示,你很容易判断当前你的localhost能不能打开。它还能切换在线和离线状态,选项中的文语言项中也有简体中 文可选,很不错。
3. Vertrigo Server
这是一个轻量级的WAMP环境,但是你下载它的时候,迅雷自带的安全组件居然说它带有病毒。 经过我的扫描(ESS3.0)和使用来看,这完全是个误报,所以大家可以放心使用。安装一路NEXT就行,其中PhpMyAdmin中居然还有原始密码, 是vertrigo,感觉在本地测试的话,这种默认没有必要。它带有一个简单的控制面板,运行状态也一目了然。
在它的localhost页面中带有常用链接,很方便。
4. PHPNow
PHPNow真的很简单,简单到安装程序就是用RAR做的一个自解压程序。自释放后快捷方式 也没有,你必须自己找到那个文件存放的文件夹,然后运行Init.cmd这个程序来初始化。初始化过程中提示设置密码,因为是在CMD命令行中,只设计了 一次密码输入,没有密码确认项,所以请设置的时候千万小心,不要忘了。它也把式Apache和MySql注册为服务,开机自启动。
在程序文件夹中,它也带有控制面板,只不过是CMD的,但很好用。
卸载就更容易了,在软件自带的控制面板中卸载服务,然后关把整个文件夹删掉就行。这么方便,图简便的可以试试。
5. PHPStudy
PHPStudy不一样,它含有IIS+PHP和Apache+PHP,软件推荐设置是后者。在任务托盘里也有图标,可以打开面板来看服务运行状态,也很简洁。
打开localhost,出现的是标准的PHP信息界面。
6. AppServ
程序安装过程中它提示你可以改变默认的80端口为服务端口,这样可以避免端口共享产生的冲 突。可有密码设置提示,但是做得比PHPNow好多了,软件还可以设置字符集,默认为UTF-8。虽然软件没有控制面板,但一切操作都在开始菜单中加入了 快捷方式,使用当然很方便。软件还带有MySql命令行终端。
7. EasyPHP
软件如其名,真的很EASY!安装一路NEXT,但是不会把Apache和MySql加载为服务,所以每次使用都要手工来启动。软件也带简单的控制面板,其他的没什么要说的了。
注:以上介绍原文出自linxo.cn,不过该网站已不在,就不列出原文地址了。
常见的两个问题
其实我只使用过XAMPP和EasyPHP,但一般都大同小异,最常碰到的两个问题就是由于端口问题无法启动Apache,和无法在本地实现Rewrite。
1. 由于端口问题无法启动Apache
如果是由于端口问题无法启动Apache, 那就关闭其它程序,一个一个的试,确定是哪个占用了80端口,最常见的就是迅雷。
2. 本地开启Rewrite模块
其它是否适用我不知道。XAMPP和EasyPHP, 找到httpd.conf这个文件,打开编辑,把所有的AllowOverride None换成AllowOverride All, 再把#LoadModule rewrite_module modules/mod_rewrite.so前面的”#”号去掉即可。

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Using the chrono library in C can allow you to control time and time intervals more accurately. Let's explore the charm of this library. C's chrono library is part of the standard library, which provides a modern way to deal with time and time intervals. For programmers who have suffered from time.h and ctime, chrono is undoubtedly a boon. It not only improves the readability and maintainability of the code, but also provides higher accuracy and flexibility. Let's start with the basics. The chrono library mainly includes the following key components: std::chrono::system_clock: represents the system clock, used to obtain the current time. std::chron

Measuring thread performance in C can use the timing tools, performance analysis tools, and custom timers in the standard library. 1. Use the library to measure execution time. 2. Use gprof for performance analysis. The steps include adding the -pg option during compilation, running the program to generate a gmon.out file, and generating a performance report. 3. Use Valgrind's Callgrind module to perform more detailed analysis. The steps include running the program to generate the callgrind.out file and viewing the results using kcachegrind. 4. Custom timers can flexibly measure the execution time of a specific code segment. These methods help to fully understand thread performance and optimize code.

C code optimization can be achieved through the following strategies: 1. Manually manage memory for optimization use; 2. Write code that complies with compiler optimization rules; 3. Select appropriate algorithms and data structures; 4. Use inline functions to reduce call overhead; 5. Apply template metaprogramming to optimize at compile time; 6. Avoid unnecessary copying, use moving semantics and reference parameters; 7. Use const correctly to help compiler optimization; 8. Select appropriate data structures, such as std::vector.

C performs well in real-time operating system (RTOS) programming, providing efficient execution efficiency and precise time management. 1) C Meet the needs of RTOS through direct operation of hardware resources and efficient memory management. 2) Using object-oriented features, C can design a flexible task scheduling system. 3) C supports efficient interrupt processing, but dynamic memory allocation and exception processing must be avoided to ensure real-time. 4) Template programming and inline functions help in performance optimization. 5) In practical applications, C can be used to implement an efficient logging system.

The main steps and precautions for using string streams in C are as follows: 1. Create an output string stream and convert data, such as converting integers into strings. 2. Apply to serialization of complex data structures, such as converting vector into strings. 3. Pay attention to performance issues and avoid frequent use of string streams when processing large amounts of data. You can consider using the append method of std::string. 4. Pay attention to memory management and avoid frequent creation and destruction of string stream objects. You can reuse or use std::stringstream.

DMA in C refers to DirectMemoryAccess, a direct memory access technology, allowing hardware devices to directly transmit data to memory without CPU intervention. 1) DMA operation is highly dependent on hardware devices and drivers, and the implementation method varies from system to system. 2) Direct access to memory may bring security risks, and the correctness and security of the code must be ensured. 3) DMA can improve performance, but improper use may lead to degradation of system performance. Through practice and learning, we can master the skills of using DMA and maximize its effectiveness in scenarios such as high-speed data transmission and real-time signal processing.

To implement loose coupling design in C, you can use the following methods: 1. Use interfaces, such as defining the Logger interface and implementing FileLogger and ConsoleLogger; 2. Dependency injection, such as the DataAccess class receives Database pointers through the constructor; 3. Observer mode, such as the Subject class notifies ConcreteObserver and AnotherObserver. Through these technologies, dependencies between modules can be reduced and code maintainability and flexibility can be improved.

The application of static analysis in C mainly includes discovering memory management problems, checking code logic errors, and improving code security. 1) Static analysis can identify problems such as memory leaks, double releases, and uninitialized pointers. 2) It can detect unused variables, dead code and logical contradictions. 3) Static analysis tools such as Coverity can detect buffer overflow, integer overflow and unsafe API calls to improve code security.
