You must remember to define the character types later in the writing process.
mysql_query ("Set names ' GBK '")
The solution is so simple.
Today I made a database query, releasing the code.
Copy CodeThe code is as follows:
/*
filename:query.php
Do:
Copy CodeThe code is as follows:
/*
Author:www.5dkx.com
Done: Generating HTML documents
Date:2009-10-27
*/
Require_once ("conn.php");
if ($_get[' all ')
{
/* Get database records so that the generated HTML file has a file name */
$sqlquery =
A simple example is calculating the number of days to borrow, which requires PHP to calculate on a daily basis, and here are a few ways to implement this date calculation:
(1) It's easy if you have a database! If MSSQL can use a trigger! Use a
This is I spent some time to sort out, but there are a few fields are not clear, want to know the friends, tell me!
Dede_channeltype
ID Channel ID
Nid identification ID
TypeName Model Name
Maintable Main Table
AddTable Additional Tables
Addcon file
At that time, I think this is very poor compared to IIS, because in IIS, you can set up a site in security or even a directory access to use the anonymous account, as long as the different sites use the same account, the security between sites will
A total of 3 files
incdb.php Database Connection
index.php Home
insettodb.php Database Operations
Database Lguestbook built-in table
Copy CodeThe code is as follows:
CREATE TABLE ' Intd ' (
' id ' int (one) not NULL auto_increment,
' Name ' varchar
Annotation symbols:
Single-line annotations/* * * Multi-line annotations
Use of quotation marks
' Single quotation marks, without any meaning, are brought directly over by any treatment;"" Double quotes, PHP
Post Demo:
Number of times: 5
Address: http://localhost/Test/upload/post.php?fid=5
Completion time: 2010-02-04-05:49:27
[Click to go to the topic list after posting]
Irrigation prevention mechanism is open, can not post within 5 seconds
[Click to
Now the application of jquery is more and more widespread, in many Web site's news section has realized the label classification + has no refresh page effect.
Also try to write one yourself, as follows (the style can be the same as the user needs to
Copy CodeThe code is as follows:
$uname =$_post["username"];
$pwd =$_post["Password"];
$link = mysql_connect (' localhost ', ' root ', ' 123456 ')
Or Die (' Could not connect: '. Mysql_error ());
mysql_select_db (' Ruida ') or Die (' Could not
/**
* Fills a string into a string of a specified length (Multi-byte security)
* @param string $str to specify the character to be populated
* @param int $len Specifies the length of the filled string, if the value is negative or less than the
Do we have to do this? Many online posts are the same, others said to, he also said to. In fact, every time the system is re-installed, such a copy, toss it again, too hard. Used apmserv this idiot-style installation package of friends may find that
Copy CodeThe code is as follows:
———————————————————————————–
Function name: Checklengthbetween ($C _char, $I _len1, $I _len2=100)
Function: Determines whether the string is within the specified length
Parameters: $C _char (string to be detected)
$I
Want to implement a function: A website invitation activity, then the participant (owner) to the promotion of the website address link to friends, friends click the link after the site registration success, owner's invitation log record number plus 1
Copy CodeThe code is as follows:
The search function, where $array is an array, $k the value to find, $low the minimum key value for the lookup range, $high the maximum key value for the lookup range
function Search ($array, $k, $low =0, $high =0)
{
Copy CodeThe code is as follows:
Function Genpage (& $sql, $page _size=10)
{
Global $pages, $sums, $eachpage, $page; Total pages, total records, per pages, current page
$page = $_get["page"];
if ($page ==0) $page = 1;
$eachpage = $page
The difference between a normal user and a search engine spider crawling is the user agent that is sent,
Look at the website log file can find Baidu Spider name contains Baiduspider, and Google is Googlebot, so we can determine the user agent sent
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