PHP4 uses a buffering mechanism, before you decide to send, all content just exists in the buffer, but not directly to the browser, although you can use header and Setcookie functions, but these two functions than the powerful output function is
Use PHP's Ob_start (); Control your browser cache!
The output control function gives you a free rein in the outputs of the data in the script. It's very useful, especially for: when you want to output the file header after the data has been
In many development, we try to use header ("Content-type:image/jpeg") to output pictures, try to use some PHP image processing technology, make the output picture more intelligent and dynamic. But we often encounter new problems, unless you specify
1.
Error tips
Warning:cannot send session Cookie-headers already sent
Warning:cannot Send session cache Limiter-headers already sent
Analysis and Solving methods
The reason for this kind of problem is that when you use Session_Start () in your
In PHP, there are some simple image functions can be used directly, but most of the images to be processed, you need to compile PHP in addition to the GD library. In addition to installing the GD library, additional libraries may be required in PHP,
session| Solve | The problem
1.Error tipsWarning:cannot send session Cookie-headers already sentWarning:cannot Send session cache Limiter-headers already sentAnalysis and Solving methodsThe reason for this kind of problem is that when you use
The output control function gives you a free rein in the outputs of the data in the script. It's very useful, especially for: when you want toWhen the data has been exported, the file header is then output. The output control function does not use
Dynamic | compression
PHP4 uses a buffer mechanism
,
before you decide to send
,
All content just exists in the buffer
,
Instead of sending it directly to the browser
,
Although you can use header and Setcookie functions to achieve
,
but these two
session| solve the problem of PHP session function, has been difficult for many beginners. Even some veteran, sometimes confused. This article, will make a simple summary of these questions, so that everyone can consult.
1.
Error
an El expression
I. El INTRODUCTION 1. Syntax Structure ${expression} 2. [] with the. Operator el provides. And [] Two operators to access the data. when you want to access a property name that contains special characters, such as. or?
with PHP Ob_start ();
Control your browser cache
The output control function gives you a free rein in the outputs of the data in the script. It's very useful, especially for: when you want to output the file header after the data has been exported.
PHP header to define a PHP page for UTF encoding or GBK encoding
PHP page for UTF encoding
Header ("content-type:text/html; Charset=utf-8 ");
PHP page for GBK encoding
Header ("content-type:text/html; charset=gb2312 ");
PHP page for
1. PHP Cookies
A cookie is a mechanism for storing data on a remote browser side to track and identify the user. PHP sends cookies in the header information of the HTTP protocol, so the Setcookie () function must be called before other information
PHP has an extremely powerful image processing capability, which makes it easy to dynamically generate web images.
This is a simple counter made using PHP.
1. General ideas:
Record the number of previous visitors in a text file, and when the page
1.Error tipsWarning:cannot send session Cookie-headers already sentWarning:cannot Send session cache Limiter-headers already sentAnalysis and Solving methodsThe reason for this kind of problem is that when you use Session_Start () in your program,
"Reprint" Original address: http://www.itbbs.cn/index.php?showtopic=1074
The output control function gives you a free rein in the outputs of the data in the script. It's very useful, especially for: when you want to output the file header after the
Template (templates) is a new concept introduced in the ansi-c++ standard. If you use a C + + compiler that does not conform to this standard, you probably won't be able to use the template.
functions Template ( function templates)
Templates allow
the function of PHP page jump is to jump one page to another page in the website. For a friend who has just learned the language of PHP, it is the basic method that must be mastered.
Page jumps may be triggered by a user clicking on a link, a
first, do not use the section as a Div substitute
One of the most common mistakes people make in tag usage is to HTML5 equivalent to --specifically, directly as a substitute (for styling). In XHTML or HTML4, we often see this code:
my Super
From the browser, the use of header (location) to jump to another page, but in fact, PHP will still execute the background code, if the following code has unsafe logic, then directly disregard the conditions set by the developer, continue to carry
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.