WAMPSome of the configuration and usage experience
In the introduction, I would like to share Some of the problems and solutions I encountered in using Wamp, which may be a bit scattered, after all, the science students thinking is straight line logic, I apologize for this. Not much nonsense to say, want to know what WAMP is or how to install, go to Baidu that search under good.
WAMP This word, each letter corresponds to one thing,w-windows a-apache m-mysql p-php, start with the letter P. Tell me about the problems and solutions I have encountered.
PHP Extensions
In the development of the project, although the default PHP Configuration is sufficient to develop, but in the actual development process you will often encounter such problems, such as a line of code
$ch = Curl_init ();
...... Redundant code is not posted, waste location
After running, the system will give you such a hintCall to undefined function curl_init (),first time withCurlto carry outGetand thePostthe request, encountered this I was also frightened, and later found on the internet for reasons, so I understandPHPThere is a thing calledextentions (Extended), it is not a very richPHP, provide a strong support, then how to open the extension, introduce two ways, take the most classic most commonly usedCurlextension for example,
You can click on the icon in Wamp php extentions php_curl curl
Second, find php.ini configuration file , my wamp file location is d:\wamp\bin\php\php5.4.12, open with Notepad , search for Curl with search function ; Extension=php_curl.dll This place, put the front one ; Get rid of it.
All two of these actions need to restart the Apache Server before it takes effect.
PHP Run timeout
Sometimes, when you run a PHP script, perhaps because the processing of data is too large, and encountered a script timeout situation, there are two ways to solve this time ,
One is to modify the default run time for PHP scripts,
There are two ways to modify the default time of a script:
First, you need to run the . PHP file to add
Ini_set (' max_execution_time ', ' 0 '), or set_time_limit (0);
Second, in php.ini This configuration file found max_execution_time = in this line,PHP default run time is - seconds, change to 0 is unlimited
There is also a command line to run it, it is necessary to say that the command line is really a very magical tool, a lot of problems that can not be solved on the Web page, the command line will be the perfect solution, no nonsense, how to use the PHP command line is the main:
First, you need to find The path to the Php.exe file, then open cmd in the run , and use the CD command to go to PHP.exe directory, put the . php file You need to run into that directory, and then execute php xxx.php(which you need to run . PHP file), if you think it's too much trouble, you can configure the environment variable to configure the php.exe Path as an environment variable so you can run the script without moving the file.
Talk about my management of code, deployment, Release (PHP)---WAMP