Now let's enumerate the ODBC functions commonly used in PHP3:
Odbc_connect (Dns,user, pass);
Returns a connection number that returns 0 if the connection fails.
Odbc_pconnect (Dns,user,pass);
Special connection, the connection does not disconnect
Source: http://dev.mysql.com/doc/mysql/en/Old_client.html
MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that's incompatible with that used by older clients. If you upgrade the server to 4.1,
Regular expressions
Return to List
if (Isset ($date)) {
if (Ereg ([0-9]{1,2})/([0-9]{1,2})/([0-9]{4}), $date, $regs)) {
echo $regs [0]. The result of the conversion is: ". $regs [3]. "-" . $regs [1]. "-" . $regs [2];
} else {
echo "$date date
/* +-------------------------------------------------------------------------------+ | = This is haohappy read
> | = Notes in Classes and objects Chapter | = Translation-based + personal experience | = Please do not reprint in order to avoid the
This is the LDAP browser written in PHP, you can learn from this program how to use PHP to access LDAP.
if (!isset ($host)) $host = localhost;
if (!isset ($port)) $port = 389;
if (!isset ($DN)) $dn = dc=my-domain,dc=com;
if (!isset ($filter))
b> Why to choose PHP
2. Competitor: asp,mod_perl,jsp
There are many techniques for implementing interactive Dynamic Web pages, in which CGI is also known as the Universal Gateway Interface (Common Gateway Interface), which is a standard programming
The code is as follows:
/*
Annotate.php3
This is a module so can be placed on any PHP3 page to allow users to add
Their comments. The comments is stored in a file with the current directory,
Whose name is constructed by adding ". Comment" to the
I read the article, "How to invoke the Asscess database and COM program through ADO in PHP", and immediately tested it, the result failed. Sad isn't it.
What to do? I had to go to the official PHP website for help, emperor, and finally I found the
Yesterday, and a friend in the PHP Exchange group (276167802, verify: CSL, interested words can join in the discussion together) mentioned
PHP6 ways to get the file extension, now take it out and share it with you:
1. How to find and intercept
This article introduces you to the protected and const attribute usages of classes and objects in PHP, as well as references for friends who need to know.
Const propertyThe field defined with the const attribute is a constant, and the constant in
In PHP, constructors and destructors are used in the class, let me give you a detailed introduction of the use of constructors and destructors in the PHP class, there is a need to understand the friend can refer to.
Destructors
The PHP destructor
This article describes some methods of finding strings in PHP, including: Finding a string, finding the number of occurrences of a string, finding a string position, three ways to find a string, and a friend you need to know to access the reference.
First of all, this article is based on the WAMP environment, so if you see here has not set up a good wamp environment, I would mind you first build the environment, because here are some practical content.
1. Preparation
In the WAMP environment,
Code:
Copy the Code code as follows:Eval ("Echo ' Hello World ';");
The upper code is equivalent to the following code:
echo "Hello World";
Output in the browser: Hello World
Use eval () to note several points:
1.eval function arguments must have a
String processing in PHP has a large number of characters or string processing functions, we come to you today to summarize the PHP string processing of learning notes, this is not only learning notes at the same time in the development of
PHP users are Linwei standard time, so with Beijing time related 8 hours, many friends in the use of PHP Date,time get time will find a difference of 8 hours, the following we look at the solution.
The simplest method is as follows
The
The use of the strcmp () function is to compare two strings, and if two strings are exactly equal we return 0, otherwise there will be various return values, this function is case-sensitive and can be referenced by friends who need it.
Return value
There are a number of ways to remove an array element in PHP, but it is common to use the unset function, but to delete the middle array element, we will rebuild the array index, as the following reference.
The code is as follows
This article summarizes the information about the use of global static and $globals in PHP and the difference between the need to understand their three differences of friends can refer to.
1.global works throughout the page.
Example 1
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