There are three ways to build a PHP environment on IIS, and the pros and cons are as follows:
1, the CGI load PHP environment, is usually IIS inside the configuration interpreter for Php.exe, early more common, currently use less. Characteristic is:
In this article, we mainly address two questions:
1: How to build HTML content into a Word document in PHP
2:php when the content in HTML is generated in a Word document, the problem is not centered, which is displayed by default in Web view.
Curl is not enabled by default, enabling methods.
Enable CURL settings
If you are under the Windows platform, then it is very simple, you need to change your php.ini file settings, find Php_curl.dll, and cancel the previous semicolon comment on
Using the differences between the above characters and the English language, we can use the Mb_strlen function and the strlen function to calculate two sets of length numbers, and then do the operation according to the law to determine the type of
10 days to learn the first day of PHP Use Apache Web server and my SQL as Web servers and databases under the php-4.3.3 environment to do a simple build and access view database with phpMyAdmin. Syntax for PHP: 1. Embedding Method: PHP can be a 2.
The following is my view of some of the procedures in the Pixy record, mainly in order to be able to quickly understand the process of thinking, record down, otherwise so many things light on the brain how to line. There may be flaws in some places,
A Domain name is any combination of a specific character set, English letters, numbers, and "-" (that is, hyphens or minus signs) in each country's text, but neither the beginning nor the end can contain a "-", "-" that does not appear
First, directly filtered out
$reg = Array ("\ r \ n", "\ n", "\ R");$replace = ";$str =str_replace ($reg, $replace, $STR);
So the content will not have to wrap.
Two, become a line wrap
Var_dump ($STR) Print the content out, see in the browser:
The following code can get all the links in the specified URL page, that is, the href attribute of all a tags:
Get the linked HTML code$html = file_get_contents (' http://www.111cn.net ');
$dom = new DOMDocument ();@ $dom->loadhtml ($html);
The following example converts gb2312 to a uft-8 formThe iconv function after php4.3.1 is very useful, but you only need to write a conversion function from uft8 to unicode.Check the table (gb2312.txt).$ Text = "e-book library ";Preg_match_all ("/[x8
PHP method: Use the "_ SERVER" array "HTTP_USER_AGENT" of PHP to obtain the information of the user agent on the page to complete this work. The code is as follows:Copy code Echo $ _ SERVER ["HTTP_USER_AGENT"];?> [Winows/chrome] output
Date function usage The code is as follows:Copy code Date ($ t ); The format is as follows:Format: year-month-day hour: minute: SecondRelated time parameters:A-"am" or "pm"A-"AM" or "PM"D-a few days, two digits. If there are less than two
If the php-cgi process is insufficient, the php execution time is long, or the php-cgi process is dead, a 502 error will occur.1). Long php execution timeIf the server performance is good enough and the bandwidth resources are sufficient, you can
There are many character string operations in PHP, including the following:(1) echo, print, printf, sprintfThe first two functions are output strings. If there is a variable name in the string, it is replaced with its value.The last two functions
1. The PHP timestamp function converts a date to a unix timestamp.Doomsday timestamp PHP The code is as follows: Copy code Echo "doomsday timestamp:". strtotime ("2012-12-21 ")
Let's take a look at the xin. Sqldatabase first. We can copy and save it as xxx. SQL. The code is as follows:Copy code Use xin;Create table bbs_post (Id int (11) not null auto_increment,Title varchar (255) not null,Username varchar (255) not
PHP obtains the server IP addressRun ifconfig in PHP to get the Linux server IP address and output it as an array. The following code is used: The code is as follows:Copy code Function getServerIp () {// use ifconfig to read the server IP
Due to the recent severe mass mailing of QQ junk information, the official team chose to detail the implementation of some WebQQ functions. The POST value obtained from friends has an additional hash parameter.This hash is encrypted in js.Below is
My php foreach () function can traverse the array and retrieve the key value of the array. How can I get the key name $ key? Or just take the first key name? For example The code is as follows:Copy code $ Keyarray = array ('000000' =>
Obtaining the date and time is also frequently used in website design. Php provides the date () time function to implement this function. The structure is as follows:Instance: The code is as follows:Copy code Echo date ("F j, Y, g: I a"). "&
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