How to change the Apache port: Locate the httpd.conf file under the Conf directory in the Apache installation directory. Open it, find "Listen", followed by the Listen number is the port number, the default state is "Listen 80". As mentioned in the
When a guest comments and posts, we do not want visitors to use the HTML tag in the message and post, so when the guest submits the message and the post, I have to delete the HTML tag, the following function is to implement this function
function
While Ajax supports UTF8
OK, first add a header to the PHP page ("content-type:text/html; Charset=utf-8″);
The code that tells the page this implementation is UTF-8
Then the content to be output with $test = Iconv (' GBK ', ' utf-8′, $test); turn
The PHP batch gets the value of the checkbox
1. Naming
2. Use
When the plan is part of a SQL instruction: if the field that participates in the control is numeric, the
if (! empty ($_post[' checkbox '))) {
$expr = Join (",", $_post[' checkbox
Beautify php, good php formatting tools
http://www.bierkandt.org/beautify/
Http://pear.php.net/package/PHP_Beautifier/download
Recently in the group to new people, their code is not too standard time to see really uncomfortable
This tool is very
Copy CodeThe code is as follows:
Date_default_timezone_set (' PRC '); Default time zone
echo "Today:", Date ("Y-m-d", Time ()), "
";
echo "Today:", Date ("Y-m-d", Strtotime ("June 2008")), "
";
echo "Yesterday:", Date ("Y-m-d", Strtotime ("-1 Day"))
The following are examples of accessing page request variables such as get,post,cookies,server,enviroment and session variables. For example {$smarty. server.server_name} Gets the server variable, {$smarty. Env.path} Gets the system environment
Obviously this is a problem that all friends who use MySQL will encounter.
Recall the original MySQL GUI tool that was mentioned in configuring the environment, yes, that's it, you can find it in http://www.mysql.com. Because Sunec is only a
Copy CodeThe code is as follows:
Class Lightpage_template {
var $Tpl _header;
var $Tpl _footer;
var $Tpl _parsing;
var $Tpl _template;
var $Tpl _dirname;
var $Tpl _parse_string;
var $Tpl _parse_array;
var $Tpl _result;
function __construct () {
Careful friends must have noticed that the last time a PHP page passed the parameters of the topic there is a program:
I used the post for the method, but why not use the Get method?
Let's take a look at the difference between post and
First, we show you how to query data by table only son values.
Task Objective: Enter the department name in the form and inquire the personnel information of the corresponding department.
Create the search.php file first.
The first step is to
So I joined in the program: mysql_query ("SET NAMES GB2312"); the problem is solved. is mainly a coding problem.
Note that the insertion position of this code should be inserted before the code that displays the data, otherwise it will be
HTML section:
function Postrequest (strURL) {
var xmlHttp;
if (window. XMLHttpRequest) {//For Mozilla, Safari, ...
var xmlHttp = new XMLHttpRequest ();
}
else if (window. ActiveXObject) {//For Internet Explorer
var xmlHttp = new
$len represents the length, the code is as follows:
Copy CodeThe code is as follows:
/**
* Generate random string
*
* generates a random string of a specified length and returns it to the user
*
* @access Public
* @param int $len The number of bits
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