Mysql_set_charset ().
This function is used in this way:
Mysql_set_charset (' UTF8 ', $link);
The success returns TRUE, and the failure returns FALSE.
It's so simple.
Here is the original PHP manual
This is the preferred the charset. Using
1.
Copy CodeThe code is as follows:
$connection =mysql_connect ("localhost", "root", "password"); Connect and select a database server
mysql_select_db ("Test", $connection);
$query = "INSERT INTO Users" (user_name); Insert a piece of data into
PHP Version:
Copy CodeThe code is as follows:
/**
* Delete logs from 7 days ago
* @param $logPath
*/
function Del7daysagolog ($logPath) {
if (empty ($logPath)) return;
$handle = Opendir ($logPath);
while (($file = Readdir ($handle))!== false)
1. Get the get generated CSS based on Get judgment
Copy CodeThe code is as follows:
2. When you click, you can open the link
Copy CodeThe code is as follows:
Beijing
Include_once ("config/db.inc.php");
$recuit
From. NET to do PHP4 years, and recently began to pursue high performance ~ ~
So I started to think it was time to write a blog.
Come and find something first ~
Copy CodeThe code is as follows:
$arr = Array (
' Attr1 ' = 1,
' Attr2 ' = 1,
' Attr3 '
Http://paypal.ebay.cn/integrationcenter/list__resource_2.html
Introduction to PHP Development in English: http://www.paypal-china.org/wangzhai/197.html
Below is the payment code for PayPal in Ecshop
This code is submitted to the PayPal payment
The last successful upgrade of the most Earth commercial version, followed by the integration of the company's community site, first of all, I now work is a local community site, with the basic program is phpwind, my task is to let Phpwind and the
Copy CodeThe code is as follows:
/**
* Get page number navigation html
* @param $pageNum: Current page
* @param $pageSize: Quantity per page
* @param $rowCount: Total Records
* @param $navUrl: Link page url
*/
function getnavhtml ($pageNum,
1, form section:
Copy CodeThe code is as follows:
my is Upfile app!!
2, Process the form page:
Copy CodeThe code is as follows:
$mkdir _file_dir = mkdir ('./img/'. $_post[' title '],0777); Get to the title, create a
Prepare the data:
Create a new database test
Execute the following statement (Create a new table Test:id, sex, name three fields)
CREATE TABLE ' Test ' (
' ID ' INT (4) Not NULL auto_increment PRIMARY KEY,
' Sex ' INT (1) Not NULL,
' Name '
Many of the code on the web is wrong, and the script house has been amended.
Copy CodeThe code is as follows:
Two rows of 5 columns altogether 10 data
$num = 5; Currently each row shows the number of
The second of PHP learning notes
1. Arrays
An array of PHP is actually an associative array, or a hash table. PHP does not need to pre-declare the size of the array, it can be directly assigned to create the array. For example:
The most traditional,
Use PHP code to call sockets, directly with the server network attack other IP, the common code is as follows:
Copy CodeThe code is as follows:
$packets = 0;
$ip = $_get[\ ' ip\ ');
$rand = $_get[\ ' port\ ');
Set_time_limit (0);
Ignore_user_abort (
When you meet all of these frustrating situations, you will be able to think of a better way to solve it. Of course it is! This is the use of unit tests. Unit testing not only solves the headache problem to a certain extent, but also makes the code
Raphael Caixeta as a developer who has just started using PHP, summed up the 10-point PHP development technology, hoping to be able to help this terrific beginner:
1, try to use PHP's own core functions and classes2, skillfully use the configuration
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