Include "config.php";Include "mysql.php";$db = new Mysql (' Test '); There are a few simple classes that you can read without being listed. is to instantiate a database connection.function Rootmenu ($PID, $n) {Global $arr, $db;$sql = "Select * from
The timestamp of the database is calculated in milliseconds, "createdate": "1411977734000", while PHP is in seconds, all the createdate three bits removed, you can use the PHP substr () functionsuch as: substr ($question [' CreateDate '],0,-3), you
There is a small item to answer the table with the following fields: ID User IDTimes answersQuestions answers the question ID, which is a string of PHP serialize () When the user answers the question like the backend submission results, the built
PHP to convert the contents of the database into a CSV file, separated by commas, in order to prevent the contents of the database contains commas, affect the file content display, you need to pay attention to add "" (double quotes)!!!Original: http:
Cloudbean Project to PHP development web management side, with Python development service control side, in the Project Python service control side sometimes need to actively connect PHP Web management side to download or upload configuration
MacOSX10.9.4mavericks enables the Apache and PHP services of the system
As we all know, Mac OSX has built in Apache http server and php, and can use the php environment with just a simple configuration. It is good to perform local tests.
1. Enable
PHP Regular Expression/I,/is,/s,/isU, etc., regular expression isu
What are PHP Regular Expressions/I,/is,/s,/isU and so on?
I is case insensitive
In s mode, the dot metacharacter (.) matches all characters, including line breaks.
In x mode, white
Php json_encode () function returns the json data instance code, json_encodejson
Json_encode () function usage.
Echo json_encode (array ('A' => 'bbbbb', 'c' => 'ddddd ');
In this way, a standard json format data is generated.
The Code is as follows:
PHP fastcgi mode uploads large files (more than 300 K) and reports an error,
When uploading images in a project recently, there were more than 300 K results. A server error was reported, which was never encountered before. The error details are as
PHP method for obtaining the field name and detailed information of the mysql DATA table, mysql Field
First, we need to know the SQL statement for querying MySQL database/table information:
Copy codeThe Code is as follows:Show databases // list
File_get_contents high latency usage, file_get_contents
First, solve the super-time problem of file_get_contents. After the super-time is returned, perform a batch commit like settimeout in js, after three or five attempts, the system confirmed that
Considerations for using static methods in PHP
This article introduces several common precautions for using static methods in PHP. Share it with you for your reference. The specific method is as follows:
1. Even if the methods in the class are not
How to install SVN (EclipsePHP Studio 3.0) and epp3svn for EPP3
If you like me and like eclipse, and you want to use it to develop PHP, EPP is a good choice (I personally think the Chinese version is a bit unaccustomed)
We usually use svn for
How to import Excel to MySQL using PHP
Note:
Modify the following line in reader. php1. Change require_once 'spreadsheet/Excel/Reader/OLERead. php' to require_once 'oleread. inc ';
2. require_once 'oleread. inc' can also be merged into a file
In-depth analysis of PHP references (&) and in-depth analysis of php references
ReferenceReferencing in PHP means accessing the same variable content with different names. This is not like the pointer of C. Instead, the reference is the alias of the
Difference between strlen and mb_strlen, strlenmb_strlen
Common functions used in php to calculate the string length include strlen and mb_strlen. When the characters are all English characters, the two are the same. Here we will mainly compare the
Php funny Avatar puzzles
When studying the GD library of php, I found a piece of code written by others. Here I hope to increase everyone's enthusiasm for php. This code mosaic the person's profile picture, which looks interesting.
Function
Php + mongodb Development Environment (linux + apache + mongodb + php)
1. Prepare the linux environment (disable selinux, iptables, configure ip, and other initialization operations)
2. Prepare the software:
1. apache: It can be installed with yum
Summary of pathinfo access mode, path access mode, and URL rewriting in ThinkPHP, thinkphppathinfo
This article summarizes the two pathinfo modes, four path access modes, and URL rewriting knowledge in ThinkPHP, and shares it with you for ease of
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