This article describes a variety of PHP cannot modify header information-headers already sent by set solution, there is a need for some friends can refer to.
Set output_buffering to on in PHP config file php.ini. Open.
Output_buffering = On
---------
There are two ways to solve time zone-related 8 hours, one is to write Date.timezone = PRC in php.ini, one is to Date_default_timezone_set in PHP code (\ ' asia/chongqing\ '); That's all you can do.
After php5, you have to set the time zone yourself,
Today a customer to bulk generate 400 phone, starting position is 10,000th, start I directly generated on the emergence of such as 10004 of the number but businessmen do not like this number, where said filter Mantissa is 4 of the number, I think
This article to tell you how to use the program to implement PHP 404 information transmission, the need for students can refer to the next ha.
For the ErrorDocument 404/404.php function in Apache configuration, the
The code is as follows
Iconv ("Utf-8", "Gb2312//ignore", $data)
The direct meaning of ignore is to ignore the error when the conversion is ignored, and if there is no ignore argument, all strings after that character cannot be saved.
Conv is not the default function for
Here we can modify its login mode to HTTP. This allows you to continue using the browser as long as it is not closed.
Take the Ubuntu environment and install PHP tutorial MyAdmin as an example in Apt-get mode.
Document location
This function is powerful, compared to PHP's own function is much more powerful, this function can automatically get the character code you give, and then according to your reference to convert to the code you want, a friend can refer to the need.
In PHP's many predefined server variables, $_server["Request_uri" is often used, but this variable is supported only by Apache, so we need a more general way to get the value of Request_uri
The code is as follows
Copy Code
Because we use a simple function, we use the file_get_contents function, so that it can analyze the CPU 100% is really the scene, and now let's look at the solution that causes CPU 100%.
Running the Nginx, php-cgi (PHP-FPM) Web Service Linux Server,
In PHP, the default code-wrapping has \\n Another is the carriage return line of/r/n and our ASCII editor Chr (13) is the carriage return and the space Oh, the following is a brief introduction of the different systems between the use of line breaks
When you connect a MySQL server, you should usually use a password. The password is not transmitted in clear text on the connection.
All other information is transmitted as text that can be read by anyone. If you're worried about this, you can use a
MySQL space speed is slow
Answer
Ask everyone a question, I paid to rent a MySQL server virtual space, found that the speed is very slow. I use the simplest form query, every query will take more than 5 seconds, this normal?
In the database,
PHP Date read time is incorrect
$DateTime = Date ("y-m-d h:i:s");Echo $DateTime;Why is the printed date inconsistent with the system time of my server? I was in the local test AH.
Configure PHP.inican also be set directly into the East eight zone
In a lot of time using the session will come out the following tips,
Warning:session_start () [Function.session-start]: Cannot send session cookie-headers already sent by (output started at /home/u114264/include/db_mysql Tutorial. class.php
The PHP tutorial matches the Unicode encoding regular method, because the Unicode encoding is special, so the general Chinese or English regular is not the right to get the content we want, let's look at a professional Unicode regular expression bar.
Install PHP Tutorial Extensions: memcache steps under Windows
1. Download the PHP extension dll:http://downloads.php.net/pierre/
2. Put the. dll into the PHP extension directory, usually in the Ext folder in the PHP directory.
3. Modify the php.ini
thinkphp Tutorial in the controller of the Web page effect code does not implement the workaround
Take the term "exit".
My "Exit System" link is written to the left frame, which is generated dynamically with JS. In other words, the target cannot be
When I do php suddenly appear php notice:use of undefined constant This error, one is the variable undefined problem, let's look at the solution.
Error hints
PHP Notice:use of undefined constant
Analysis
These are PHP hints rather than errors, and
Today I met Arning:mysql_fetch_assoc () expects parameter 1 to be resource, boolean given in, let's take a look at the solution.
Today, when I was learning PHP, I encountered this error:
WARNING:MYSQL_FETCH_ASSOC () expects parameter 1 to BES
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