[PHP] practical functions 8 // Create a dBase data table
Int dBase_create (string filename, array fields)
// Open the dBase data table
Int dbase_open (string filename, int flags)
// Close the dBase table
Boolean dbase_close (int dbase_identifier)
In asp and php, textarea submits a large amount of data and causes loss. I use textarea to submit a large amount of data.
Mediumtext is selected as the field type and data is lost.
Later I changed it to longtext, and the data is still lost,
In
Class structure: there may be three internal elements of the class: constant, property, and method. the function can be understood as a constant outside the class, variables and functions.
The code is as follows:
Class TEST{Const NAME = 'value';
Gregarius has a good degree of support for Chinese characters. The only drawback is that garbled characters may occur in the date format. In fact, you only need to modify the rss_locale_date method of the util. php file in the root directory to
It is easy to learn about php. ini configurations, so as to make full use of its functions. the syntax of this file is very simple. Blank characters and rows starting with semicolons are ignored. It is easy to learn about php. ini configurations, so
What php object-oriented friends need to know. What php object-oriented friends need to know.
First look at the code:
NULL, 'y' => NULL); function __construct() { print "StrictCoordinateClass is being created"; print ""; } function __destruct() {
Replace the phpsession class with the mysql memory table. you can test the effect on your own.
The code is as follows:
/**@ Usage: use some other storage method (mysql or memcache) instead of php sessoin@ Author: lein@ Version:
The function of capturing YAHOO stock quotes in real time. you can learn the ideas and specific code to broaden your knowledge.
The code is as follows:
Function getYahooQuote ($ stockSymbol = "CCR "){If (! $ TargetURL) $ targetURL =
The php program is UTF-8, sqlserver is 2005 Chinese characters, and the internal code is gb18030. the common mssql_connect cannot set the internal code conversion. the read data is garbled on the UTF-8 page. Zhou Haihan/Wen
ADO can use statements
As a server-side scripting language, PHP is fully competent for tasks such as simple writing or complex dynamic web pages. But this is not always the case. sometimes, to implement a function, you must use an external program (or a command) of the
How to maintain interaction between the front-end page and the background CGI page without refreshing a new page during the web page creation process remains a problem. Here we will introduce two methods. Method 1: use cookies for interaction.
There
The following describes how to use the header function. The following describes how to use the header function.
No matter how many headers there are on the page, it executes the last one, but it is conditional. for example:Header ('Location: https:/
Generally, php collection code can be used. here is a simple implementation code.
The code is as follows:
$ Title = 'foot home ';$ Hello = 'jb51. net! ';$ File = file_get_contents ('http: // www.baidu.com ');$ File = iconv ("gbk // IGNORE", "UTF-
Mb_convert_encoding is used to convert the encoding. I have never understood the concept of program encoding, but now it seems a bit open. However, the English language generally does not have encoding problems. only Chinese data can have this
Php date and time processing function summary, hour, date, and so on. It is worth your reference. Merge php computing hours to zero
The code is as follows:
/* Author: Yang yuyangyu@sina.cn */// The $ hours_min parameter is an array. the array
When writing a program, developers usually translate the operation logic that has been designed or conceived directly in programming languages. About the Author
Wang Dandan, a software engineer at IBM China system and technology center, has been
Php to get the code summary of the currently accessed file name. you can select as needed. Recommended functions:
First, PHP obtains the URL of the current page: dedecms also uses this
The code is as follows:
// Obtain the current script
Php is popular recently, so more and more friends are learning php. here we will sort out some database operations. For more information, see.
1. create a database table:
The code is as follows:
Create database club;Create table member (Id int (11
At the beginning, I was wondering why there were two libraries, and there were official documentation support in php.net. I tried to use memcache before. later I found that memcached supports the setMulti method and is ready to switch to the
Because the id in the database may be large. If % d is used, the correct result may not be returned because it is out of the range. Therefore, it is recommended that %. 0f be better than % d when formatting the id. Compare to construct SQL
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