PHP implements the 301 redirect code as follows:
Header (' http/1.1 moved Permanently ');/Send 301 Head
Header (' location:http://www. ') $strDomain. $request _uri);//jump to my new domain address
I wrote 301 code with the 301.inc.php file, and
There are few examples of PHP bot programs on the Web, which is also a business requirement, and it is very interesting to start contacting such programs. The so-called bot is actually simulate get or post, to action some programs, to achieve some
We know that there are several PHP configurations:
1, the CGI load PHP environment, is usually IIS inside the configuration interpreter for Php.exe, early more common, currently use less.
Characteristic is: stable, but the efficiency is too low.
2
One, PHP script and dynamic page.
PHP script is a server-side scripting, can be embedded and other methods and HTML files mixed, but also class, function encapsulation, such as the form of templates to the user request processing. In any way, the
If you are designing with Dreamweaver or FrontPage, then unless you deliberately delete them, they all exist. Let's do it step-by-step and improve the search engine in the project.
First, design a search formBuild a search.htm in the root
The following is a simple PHP project distributed deployment, a session of the synchronization scheme, using Memcache to store the session. and summed up three kinds of configuration methods, need friends can refer to the next 1, directly modify
When using PHP to do background management will encounter the user login page will prompt Warning:session_start () [Function.session-start]: Open ... Error, followed by failed:no such file or directory, this is to tell us that the directory is not
1, if you can define the method of the class as static, as far as possible to define static, it will increase the speed of nearly 4 times times.
2, $row [' ID '] speed is $row[id] 7 times times.
3, ECHO is faster than print, and uses Echo's
This article mainly introduces PHP dynamic generation JavaScript File 2 examples, need friends can refer to the following PHP dynamic Generation First step: Write the JS code directly in the PHP file, and declare it in the header this is a
At first Curl was designed as a command-line tool, and fortunately, PHP also supports curl. By Curl This tool, we can freely send HTTP requests to a URL to obtain or submit data in a PHP program, and support many other protocols, such as
Use the counter code directly in the PHP file:
$countfile = "Num.txt";
Defines that the file written by the counter is num.txt under the current directory, and then we should test whether the file can be opened
if ($fp = fopen ($countfile, "r+"))
How to build the station environment under the WIN7 flagship edition
First, we need to prepare the necessary software
Apache Httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
PHP Php-5.3.10-win32-vc9-x86.zip
MySQL Mysql-5.5.20-win32.msi
Second, the
when developing a system using the OO pattern in PHP, it is often customary to store implementations of each class in a separate file, which makes it easy to reuse classes and facilitates future maintenance. This is also one of the basic ideas of OO
PHP Implementation synchronous remote MySQL:
Requirements: Because the company's English web site is located in the United States, and these web site data to be synchronized with the mainland server data. Sync time is within one day.After you
phpMyAdmin Configuration Installation Full Introduction phpMyAdmin installation configuration tutorial fool version, mainly for phpMyAdmin 2.11.X configuration installation, the other version of the same installation method.
1, first download
First have to populate the template with content that needs to be static The code is as follows: #eg. This is the static homepage function Staticindex () { $newslist = $article->getarticles (null,54, ' DESC ', 1,6,false,1,2, ", 0,0,1); if (
I, open and use Smarty caching To turn on the Smarty cache, simply set the caching to true in the Smarty settings parameter and specify Cache_dir. Also set the Cache_lefetime parameter to specify the cache lifetime (in seconds). If you want to
SVN is also a directory synchronization we can use it to do version control, below to see about the Linux SVN submission ignores some files, directories (ignore attributes), I hope the example will help you.
In the project, some files are not
Some users will be prompted when they visit some Web sites, "This page contains a redirect loop," and there is no way to solve the problem regardless of the refresh. In fact, the Web page produces too much redirection. Clearing cookies on this site
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.