In the previous article, we have installed httpd and MySQL services. Next, we will install PHP.
We know that,PHP works in three modes:: CGI, module, FastCGI. Apache and PHP are usually combined in the form of modules. In view of FastCGI's working
The example of using php to guard another php process and to guard another php process. An example of using php to guard another php process. to guard another php process, use php to guard another php process (except for running the apache module
Example of using php to guard another php process. An example of using php to guard another php process is to use php to guard another php process (except for running the apache module and nginx). php needs to guard B. php in B. example of using php
Predefined variable SERVER variable: $ _ SERVER Note: Used in PHP4.1.0 and later versions. In earlier versions, $ HTTP_SERVER_VARS is used. $ _ SERVER is an array containing headers, paths, and scriptlocations. The object of the array is created by
Some server information is often used in php programming. I paste the commonly used information in highlighted mode, and the rest will be placed behind it for future reference.
The code is as follows:
$ _ SERVER ['http _ ACCEPT_LANGUAGE '] //
PHP development should be aware of the concept of PHP running mode, this article will share with you about PHP is now more common five operating modes: including CGI, fast-cgi, CLI, ISAPI, Apache module DLL, The following author of the five
PHP Installation Guide FAQ. I. Q: I have installed the APACHE module of Unix by step, but the source code of my PHP script is displayed in the browser, or the browser prompts me to save the file. Why? A: This is 1,
Q: I have installed the APACHE
$_server[' php_self ') #当前正在执行脚本的文件名, related to document root. $_server[' argv '] #传递给该脚本的参数. $_server[' argc '] #包含传递给程序的命令行参数的个数 (if run in command-line mode). $_server[' Gateway_interface ') #服务器使用的 the version of the CGI specification. For
$ _ SERVER [PHP_SELF] # file name of the script being executed, which is related to documentroot. $ _ SERVER [argv] # parameters passed to the script. $ _ SERVER [argc] # contains the number of command line parameters passed to the program (if it is
First, PHP gets the URL of the current page:
Copy the Code code as follows:
Get the current script URLfunction Getcururl (){if (!empty ($_server["Request_uri")){$scriptName = $_server["Request_uri"];$nowurl = $scriptName;}Else{$scriptName =
Variables: $_server, used in PHP 4.1.0 and later versions. Previous versions, using the $HTTP _server_vars
Variables: $_env, used in PHP 4.1.0 and later versions. Previous versions, using the $HTTP _env_vars
Variables: $_cookie, used in PHP 4.1.0
The file name of the script to be executed, which is related to documentroot .. $ _ SERVER [PHP_SELF] # file name of the script being executed, which is related to documentroot. $ _ SERVER [argv] # parameters passed to the script. $ _ SERVER [argc] #
What is the difference between CGI, FastCGI, Apache2handler, CLI? This article mainly introduces 4 kinds of common operation modes of PHP, and details the CGI, FastCGI, Apache2handler, CLI. We hope to help you.
Sapi:server application Programming
: This article mainly introduces the significance of variables related to PHP ---- $ _ SERVER ---. For more information about PHP tutorials, see.
These are also found online, hoping to help you.
$ _ SERVER ['remote _ port'] // PORT. $ _ SERVER
Php Chu Getting Started
This chapter highlights
Decide whether to outsource or build your own
Find the right ISP
Avoid common host traps
Install PHP
Choose PHP Development Tools
In this chapter, we will discuss the pros and cons of
$_server[' php_self ') #当前正在执行脚本的文件名, related to document root.
$_server[' argv '] #传递给该脚本的参数.
$_server[' argc '] #包含传递给程序的命令行参数的个数 (if run in command-line mode).
$_server[' Gateway_interface ') #服务器使用的 the version of the CGI specification. For
Common php pre-defined variables can be added to your favorites for future use.
The code is as follows:
Echo "current operating system information". PHP_ OS ."";Echo 'file path and FILE name: '. _ FILE __.'';Echo "current PHP version
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.