Database connection
$conn = mysql_connect (' localhost ', ' root ', ');
mysql_select_db (' Test ', $conn);
mysql_query ("SET NAMES GBK");
/*
The table that supports the transaction must be a InnoDB type
Only one occurrence of a transaction can
1.echo is much faster than print. Two methods will print things on the page, but Echo does not return any values, and print returns 0 or 1 when it succeeds or fails.
2.include_once is more time-consuming than include. Because it needs to check if
Summary of my daily work in the use of PHP to operate some of the actual word.
Method one: Use PHP com module. It also uses the local APIs provided by word, all available only on Windows systems.
[PHP] view plain copy visiable = false; $doc _file =
The variable passed to the Isset returns False if it is assigned null after the declaration or declaration
$num 2 = 100;
$num 3 = null;
$num 4 = "";
Var_dump (Isset ($num 1));//false
echo "";
Var_dump (Isset ($num 2));//true
echo "";
Var_dump (Isset
Most of the time, we need users to enter some data, and display the data, we can use the PHP form to implement.
form
//action instructions to pass the data to the file, if the action is empty, Commits to the current script
name:
number:
Use PHP to filter code in HTML that might be exploited to introduce externally dangerous content. There are times when you need to have users submit HTML content to enrich the information that users publish, and of course, some of the code that
Otherwise it will be garbled.'G2 H5 G $ C I6 Z $ Y1 R9 C$ S 'c8 T (m) E6 w6 I & E + RThere is a function in the PHP function library: iconv ()
Usage:
$ Text = iconv ("UTF-8", "gb2312", $ text );
It's easy. In turn, to replace gb2312 with UTF-8
$
Http://www.laruence.com/2011/02/13/1870.html
You may have noticed that when using echo in PHP to output a large string, the execution time is obviously long, and some may think that PHP's echo performance is very poor.
My previousArticle.
I did not pay attention to this problem when I mounted the PHP server to Linux,
A few days ago but encountered in Linux verification code under the picture can not display the situation, found that Linux also has GD library support, so installed
In fact, the so-called ezpdosql of this framework is the hsql of hibernate, nothing, so the list once, nothing special
First, the from clause$ M = epmanager: instance ();
$ Books = $ M-> Find ("from book as B where B. Title =? ", $ Title ); //
$ _ Server ["QUERY_STRING"], $ _ server ["request_uri"], $ _ server ["script_name"], $ _ server ["php_self"]
1, $ _ server ["QUERY_STRING"]Description: query string
2, $ _ server ["Request_uri"]Description: The URI required to access this page
3, $ _
How does PHP generate a Google sitemap XML file:
"; if(is_dir($directory . "/" . $file)) { //echo "point2"; $disallowed_abs = fl_contains($directory."/".$file, $disallow_dir); // handle directories with pathes $disallowed = ar_contains($file,
Php xml operation class domdocument attributes and MethodsNote that case sensitivity must not be incorrect.
Attribute:
Attribute list of the attributes storage node (read-only)
List of child nodes of the childnodes storage node (read-only)
PHP 4 introduces the foreach structure, which is similar to Perl and other languages. This is just a simple way to traverse arrays. Foreach can only be used for arrays. An error occurs when you try to use it for another data type or an uninitialized
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service