One MYSQL operation class
The code is as follows:
Class DB {Var $ host_addr = "localhost ";Var $ host_user = "root ";Var $ host_psw = "123 ";Var $ db_name = "test ";Var $ link_id;Var $ query_id;Var $ numRow;Function DB (){$ This-> link_id = @
PHP5 has the following important features:
· Supports new object models and Zend engines with many new features.
The XML support is completely rewritten, and the extended performance is centered around the excellent libxml2 library
Convert GB encoding to UTF8 using PHP
The gb2utf8. php file is as follows:
The code is as follows:
Class GB2UTF8{Var $ gb; // The GB2312 string to be convertedVar $ utf8; // The converted UTF8 stringVar $ CodeTable; // array of GB2312 Code files
New features of PHP5: the kernel of PHP processing objects that are more object-oriented has been completely re-developed, providing more functions while improving performance. In earlier versions of php, the methods for processing objects and basic
How to use a script to simulate the login process to view the code on his login page, to see which page he submitted, and what the variable is.
The code is as follows:
Obviously, if you want to log on, you need to post the username, passwd, and
PHP q & a verification code
The code is as follows:
Class code{Var $ width = 160; // the image widthVar $ hight = 40; // The Image heightVar $ image;Var $ red = 223; // The RGB color of the imageVar $ green= 225; // RedVar $ blue = 227; //
Use the operators in PHP to compare the = operator of PHP in a new article comparing strings in PHP with the = operator published on Greg Beaver's blog recently. notes for comparing string values.
In some cases, PHP converts a numeric data (such as
In the PHP Development Getting Started Tutorial, object-oriented PHP is a scripting language with weak Variables. that is to say, you do not need to define them first, which is flexible. It can also give a lot of freedom, but for programs, freedom
In PHP, time () is used to obtain a number. this number indicates how many seconds have elapsed since.
However, this facilitates computing,
Find that the previous day is time ()-60*60*24;
Find that the time of the previous year is time () * 60*60*24
Featured here, a high-handed summary of PHP learning resources and links.
When I found PHP learning resources on the Internet, I visited Openphp1.cn. as far as I know, the webmaster of the website is proficient in PHP. it is worth learning. He
PHP Development Tool 1 design tool
UML and related design tools
-Argo UML
The UML drawing tool supports PHP stub generation. (Inclucial spin off is Posideon)-written in Java.
-Umbrello UML
The UML drawing tool supports PHP stub generation. Unix/KDE
A typical PHP watermarking program for images
/*************************************** ***********************
Parameter description:
$ Max_file_size: size limit of the uploaded file, in bytes
$ Destination_folder: File Upload path
$ Watermark:
Let your website homepage automatically select the language to jump everyone is using google, you use the Chinese system to open google's homepage, open naturally the Chinese homepage, rather than other languages. Because google will automatically
The use of PHP functions to solve SQLinjection SQL injection problems has become a hot topic in ASP. of course, there are still many well-known PHP programs at home and abroad "killed ". As for SQL injection details, there are too many articles on
The solution for PHP reading MYSQL Chinese garbled characters is to switch the host of a website. I did not expect Php and Mysql Chinese garbled characters.
In the past, Mysql for foreign hosts was 4. x series, I feel better, no matter GBK and
Php advanced: unlimited classification 1. Analysis
When we use php to create a website, classification is very important. The second classification is called subclassification under the classification. Currently, most websites are classified only
I used adodblite to solve the problem. when I used the full version of adodb, the server did not support it,
I almost wrote a class myself to implement the adodb function, so that I don't need to change my program.
But now I use adodb-lite, which
Php predefined constants are defined in the PHP kernel. It includes PHP, Zend Engine, and SAPI module.
PHP_VERSION (string)
PHP_ OS (string)
PHP_EOL (string)
Available from PHP 4.3.10 and PHP 5.0.2
PHP_INT_MAX (integer)
Available from PHP 4.4.0
Just now I simplified the php library and found many things. The php ming library is used to generate flash! Although the module is experimental, it is interesting.
A big table is very interesting. it gives people a feeling of 8 GB.
Analyze the output buffer in PHP. let's look at a piece of code:
For ($ I = 10; $ I> 0; $ I --)
{
Echo $ I;
Flush ();
Sleep (1 );
}
? > 〉
According to the php manual, this function sends all the output of the program so far to the user's browser.
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