Phpsocketsocket is located in the TCP/IP Protocol Transmission Control Protocol, providing client-server mode of asynchronous communication, that is, the customer to the server to make a service request, the server receives the request, provide the
One or two important catalogues:Apache has two important directories: 1, configuration directory/etc/httpd/conf;2, document directory/var/www:
Two modes of configuration:Apache is configured under Fedora in two ways: text mode (Terminal command
With Jpgraph, you can easily draw graphs such as line charts, column charts, pie charts, and so on, as long as you know some of its built-in functions.
First, make sure that PHP opens the Gd2 extension:
Open the php.ini, navigate to
Today at the Mango station to see a piece of code, feel very good, so reproduced over. The following is the original text.
Formats the JSON data in the form of a string as an indented form. The JSON string that is usually converted with Json_encode
1. Install vs.php plug-in
2, New PHP Project: For example, select PHP 4 webproject create PHP project.
3. New PHP page
4. Add PHP Code
5. Set the Start Page
6. Set Breakpoints
7, Start debugging
When you start a new instance,
Often write collector publishing interface need to use the function of remote attachment, so I wrote a php remote download file to local function, generally enough, if the server supports the Curl function, the program will prefer curl, Because the
Although the latest PHP 5.4 has good support for JSON encoding, that is, through the Json_unescaped_unicode parameter, for example:
Json_encode ("Chinese", Json_unescaped_unicode) for the earlier version of PHP, processing the JSON encoding of the
paging, when doing web development will encounter, but webpy but there is no built-in distribution class, only to write a simple page of the class. In this article, we will implement a simple paging class with webpy (which is actually just Python's
When using PHP to handle strings, we often encounter the problem of character encoding conversion, have you ever encountered a ICONV conversion failure?
Found the problem, the search on the Internet, only to find Iconv original bug, encountered
Directly on the code, the length of the substring can be set by itself (for example, 4 characters or 5 characters in a row).
Copy CodeThe code is as follows:
$str = ' I'm Chinese, I'm a foreigner, I'm Korean, I'm American, I'm Chinese, I'm English,
About the "php eggs" saying maybe a lot of old phper already know or heard, as if early in the PHP4 version of the time there are eggs, very good fun, may have gradually been forgotten in recent years, in fact, the egg function in the PHP script
The code is very simple, can be found on the Internet, but on my machine is not displayed, the display has been this PHP file path,
It took me some time to get it done.
On the net looked down, there is such a saying:If PHP with pictures, zip,exe
Today encountered a problem is to use fwrite write TXT file with RN can not be changed line
Tried for a long time did not find a way!
Suddenly think of an east before reading a book and later still use this east to solve!
Now write to prevent the
The previously mentioned CodeIgniter introduces custom public functions this article mentions public function implementations, and global variables can also be implemented with helper functions.
However, a more appropriate approach may be defined
is not accustomed to the variable scope in PHP, PHP function variables and the global is completely isolated, that is, cannot access each other.
such as the following:
Copy CodeThe code is as follows:
$test = 123;
ABC (); Nothing is output here,
No more nonsense, just go to the code.
Copy CodeThe code is as follows:
Error_reporting (E_all); Open error
Set_time_limit (0); Script does not time out
Date_default_timezone_set (' Europe/london '); Set the time
/** Include Path **/
Set_include_
Because there is a project news release system, the database content field is stored in the original image of the path (of course, there are other text content, the content of illustrations, the picture path is saved), but the front desk want to use
1.PHP page language itself is not the appropriate encoding type, when you write directly in the script in Chinese is certainly garbled, needless to say the database
Workaround:Select ' UTF8 ' or ' gb2312 ' so that the customer's browser
PHP function Strip_tags provides the ability to remove HTML and PHP tags from a string, which attempts to return the result of the given string str after removing null characters, HTML, and PHP tags.
Because Strip_tags () cannot actually validate
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