This article is mainly to share with you the PHP system functions of the example of the detailed, I hope to let you have a more in-depth understanding of system functions.
Array-related functions:Key/value operations for arrays:1.array_values ($arr)
PHP System traffic analysis program> create table stream (
Ip text,
STime int,
Visits int,
Info text );
If ($ day $ Mlink = mysql_connect ('localhost', 'Ajax ', 'xxxxxxx ');
// Count the total number of times the home page has been browsed so far
$
Problem Description: Ave is a GNU open-source scientific computing software compatible with matlab syntax. I wrote a piece of Ave script, specifying octave as the interpreter at the beginning #! Usrbinoctave can directly execute this script under
PHP System class functionsAssert function: Check if the assertion declaration is incorrectextension_loaded function: Check if PHP extension is loadedGet_cfg_var function: Gets the value of the PHP configuration optionGet_current_user function: Gets
partitioning of time zones
The world is divided into 24 time zones, each time zone has its own local time, the same time in the local time zone of 1-23 hours, such as the local time in London and Beijing local time difference of 8 hours. In the
Let's take a systematic look at the standard execution flow of applications under thinkphp Framework development:
用户URL请求
调用应用入口文件(通常是网站的index.php)
载入框架入口文件(ThinkPHP.php)
记录初始运行时间和内存开销
系统常量判断及定义
An old system is a system that does not encode using the PHP 5.3 namespace (namespace) attribute.
However, as long as your system is running in PHP 5.3 and above the environment, in your old system, you can use these new features such as
Error_log: Send out an error message.
Error_reporting: Configure the level of error message return.
GETENV: Get the environment variable of the system
Get_cfg_var: Gets the configuration option value for PHP.
Get_current_user: Gets the name of the
Error_log: sends an error message.Error_reporting: the level of returned error information.Getenv: Get the environment variable of the systemGet_cmd_var: Get the PHP configuration option value.Get_current_user: get the name of the PHP itinerary
Gettype: Get the type of the variable.Intval: convert a variable to an integer.Doubleval: convert a variable to a Double Floating Point.Empty: determines whether the variable is configured.Is_array: determines whether the variable type is an array
Error_log: Send out an error message.
Error_reporting: Configure the level of return for error messages.
GETENV: Obtaining the environment variables of the system
Get_cfg_var: Gets the configuration option value for PHP.
Get_current_user: Gets the
Error_log: Send out an error message.
Error_reporting: Configure the level of return for error messages.
GETENV: Obtaining the environment variables of the system
Get_cfg_var: Gets the configuration option value for PHP.
Get_current_user: Gets the
What is the difference between date and gmdate in PHP?
What is the difference between date and gmdate in PHP?
The time in PHP has 2 formatting functions: Date () and Gmdate (), which are described in the official documentation:
date-formatting a
I'm used to setting the log path is this/home/www/logs/domain name. logLike what/home/www/logs/www.yundaiwei.com.log
For ease of administration, logs need to be kept in one file by day and a log of the specified number of days, which is deleted
Compressing a batch of files, using the system call Linux compression command for file compression.Command Common code:functionAddzip ($webdocs,$zipfile,$param,$file){ system("CD$webdocs; Tar$param $zipfile\"".$file." \"",$output); if($output= = 0
>create Table Stream (
IP text,
stime int,
visits int,
info text);
?
if ($day $mlink =mysql_connect (' localhost ', ' Ajax ', ' xxxxxxx ');
Statistics to date the total number of pages browsed
$query = "Select SUM (visits) as tvisits from
Program | Flow >create Table Stream (
IP text,
stime int,
visits int,
info text);
?
if ($day $mlink =mysql_connect (' localhost ', ' Ajax ', ' xxxxxxx ');
Statistics to date the total number of pages browsed
$query = "Select SUM (visits) as tvisits
PHP function system details:
Execute an external program and display the output data.
System Syntax: String System (string command, int [return_var]);
System return value: String
Function types: operating system and environment
System
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.