This article collects the PHP development often encounter some doubts or some small problems, we can refer to.
The difference between some of the above functions,
the difference between 1.isset () and Empty ()Both are used to test variables. But
Problem
What is PHP file? which software can be used to open
Workaround
PHP, a nested abbreviated name, is an abbreviation for the English Super Text preprocessing language (Php:hypertext preprocessor). PHP is an HTML embedded language, PHP and
Introduction ThinkPHP is a fast and simple lightweight PHP development framework based on MVC and object-oriented. it complies with the Apache2 open source protocol and has been adhering to simple and practical design principles since its birth,
1. If statement
An If statement is an important feature in most languages, and it executes program segments based on conditions. The IF statement in PHP is similar to C:
if (expr)
Statement
As discussed in the expression, expr is computed as
/* +-------------------------------------------------------------------------------+ | = This is haohappy read
> | = Notes in Classes and objects Chapter | = Translation-based + personal experience | = Please do not reprint in order to avoid the
Trim
(PHP 3, PHP 4 >= 4.0.0) Trim--Removes a blank description of the beginning and end of a string
String Trim (String str [, String charlist])
Note: The second parameter is used in PHP 4.1.0
This function returns the new string after which the STR
For
The For loop is a very complex loop in PHP. It behaves as if it were in the C language. The following is the syntax for looping:
for (EXPR1; expr2; expr3) statement
The first expression (EXPR1) is the value of the loop's unconditional start.
At
fopen
(PHP 3, PHP 4 >= 4.0.0) fopen--open file or URL description
int fopen (string filename, string mode [, int use_include_path])
If filename starts with "http://" (case insensitive), this function opens the specified server with an HTTP 1.0
Fputs
(PHP 3, PHP 4 >= 4.0.0) fputs--Write to file pointer description
int fputs (int fp, string str [, int length])
Fputs () is an alias for the Web site construction server script Class \phpphp user manual Fancyfunction.fwrite.html>fwrite (), and
PHP Control statements
1. If statement
An If statement is an important feature in most languages, and it executes program segments based on conditions. The IF statement in PHP is similar to C:
if (expr)
Statement
As discussed in the expression,
Use pear to install php extensions on windows use pear to install php extensions on windows related websites: www. php. netpear. php. netpear2.php. netpecl. php. netpear2 needs to use sqlite3 to execute the command: 1. phpD: phpphp5.3.5pyrus.
Error_log function is a built-in function in PHP. it is mainly used to write error logs. it is developed by many people or in a development project that is complex and has no unit test, you can use it to record errors in our program, especially
PHP output string problems with more special characters
Want to use Echo to output the following string
A:4:{s:8: "collects"; A:0:{}s:8: "Comments"; a:0:{}
Echo ' A:4:{s:8: "collects"; A:0:{}s:8: "Comments"; a:0:{} ';
It's definitely not going to
1. If statement
An If statement is an important feature in most languages, and it executes program segments based on conditions. The IF statement in PHP is similar to C:
if (ExPR)
Statement
As discussed in the expression, expr is computed as
PHP Tutorial for Beginners: detailed options for configuring php. ini. Php. ini or php3.ini is the configuration file that PHP reads at startup. The file is stored in usrlocallib. In PHP3.x, the configuration file is php3.ini, and in PHP4.x, it is
PHPisset () and empty () usage differences detailed references through learning the PHP language, you should know that it is a function-based HTML scripting language. The huge function library supports the implementation of PHP functions. Next we
$var = ";
The result is true, so the text behind will be printed.
if (Isset ($var)) {
Print "This var was set set so I'll print.";
}
In the example below, we will use Var_dump to output the return value of Isset ().
In the same environment, PHP does not have a problem using the Ant build project in the terminal to perform the PHPUnit test, but it will error when Jenkins builds automatically:
PHPUnit[EXEC] PHP Parse error:syntax error, unexpected ' [EXEC] PHP
/* + Tips + | this document is Haohappy-read | notes in the ClassesandObjects chapter | translation-oriented + personal experiences | do not repost the notes to avoid unnecessary troubles. thank you |
/* + --------------------------------------------
PHP4 User Manual: function-fputs. Fputs (PHP3, PHP44.0.0) fputs -- description of intfputs (intfp, stringstr [, intlength]) written to the file pointer
(PHP 3, PHP 4> = 4.0.0) fputs -- description written to the file pointer
Int fputs (int fp,
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.