The headerlocation redirection statement fails to redirect the page. Function header: page jump http header information has many functions, mainly including the following: 1. jump when the browser accepts Location: xxxx in the header information,
Examples of Use methods:
Set width, equal scale
Copy CodeThe code is as follows:
Include (' simpleimage.php ');
$image = new SimpleImage ();
$image->load (' picture.jpg ');
$image->resizetowidth (250);
$image->save (' picture2.jpg ');? >
Set
B.php's Code
Copy CodeThe code is as follows:
can only be accessed via post
if ($_server[' request_method '] = = ' GET ')
{header (' http/1.1 404 Not Found '); Die (' Pro, page not present ');}
Session_Start ();
$fs 1=$_post[' a '];
$fs 2=$_post['
1. main file, visit this page, the page according to the "verification page" returned results set the return status of this file header (' http/1.1 '. $code. '. $_status[$code])
Copy CodeThe code is as follows:
Ini_set (' Max_execution_time ', 120);
Using PHP to generate a short url scheme the normal url with parameters may be very long, especially if we need to print paper products such as enterprise brochure to print a long url, it is very ugly, in addition, few people will remember this
When you write
Program Then, when you need to write another program, for example, when you write a message board, you need to write another program
Article Management Program. For details, refer to the following figure:
Config. php
Header. Inc.
Technorati labels: Asp.net, PHP, ASP, JSP, 301 redirection
IntroductionProgramThe system implements 301 redirectionCode:1. Linux host redirectionGodaddy's liunx host, Godaddy itself supports Apache, so you can directly create. the htaccess file is
PHP code for 301 redirection. PHP code for 301 redirection PHP code for 301 redirection: header (HTTP1.1301MovedPermanently); code for sending a 301 header (Location: www... $ strDomain. $ request PHP code for 301 redirection
The code for PHP to
Programming One: little B has recently been fascinated by string processing techniques, he has designed various processing methods, and computed the properties of strings. This is no exception, he defines a new method of character substitution.
Thinkphp framework 404 page settings-Shen Wenzhe 404 page is an error message optimized when the system cannot find the requested operation method and the requested controller name.
Step 1: Create an EmptyController. class. php instance in the Home/
Easy to use method:
Copy the Code code as follows:
$object = new Httpdownload ();$object->set_byfile ($file)%n#h#%;//server file name, including path$object->filename = $filename;//download Save as file name$object->download ();
3. Source
The following describes how to use the header function. The following describes how to use the header function.
No matter how many headers there are on the page, it executes the last one, but it is conditional. for example:Header ('Location: https:/
PHP and Nginx support dynamic image cropping. I wrote an article about the high-performance PHP image dynamic cropping solution a long time ago. The article uses nginxCache and rewrite for implementation. of course, with CDN, that solution has a
How to perform identity authentication in PHP and how to perform identity authentication in PHP ,? If (! Isset ($ PHP_AUTH_USER) {Header (WWW-Authenticate: Basicrealm = enter your username and password :); Header (HTTP/1.0401 Unauthorized); echo
This is a creation in
Article, where the information may have evolved or changed.
help friends to collect, see he opened a South Korean web site a point to save see not go down the speed is too slow, originally wanted to write with PHP, just see no
The phpdownload. php implementation code jumps to the download file (response. redirect ). Jump to the core code implementation. The copy code is as follows: if (isset ($ link) {Header (HTTP1.1303SeeOther); Header (Location: $ link); exit ;}the
How to perform authentication in PHP .? If (! Isset ($ PHP_AUTH_USER) {Header (WWW-Authenticate: Basicrealm please enter your username and password :); Header (HTTP1.0401Unauthorized); echo verification failed, you cannot access network resources
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.