Install PHP as Apachedso

PHP is often used with Apache Web servers for Linux/unix platforms. When we install PHP in the Apache environment, you have three installation modes to choose from: Static module, dynamic module (DSO) and CGI. I suggest you better install PHP as

PHP uses curl to get remote pictures

Curl requires the PHP environment to support the line. You can run the Phpinfo () function to support, generally to the php.ini; Extension=php_curl.dll, remove. Restart IIS or Apache. The code is as follows Copy Code /*

How to keep the completed information when PHP submits the form failed

1. Use header header to set cache control header Cache-control. PHP code1. The code is as follows Copy Code Header (' Cache-control:private, Must-revalidate '); Support page Bounce 2. Use the

PHP uses the Phpexcel class to export import Excel usage

Export Excel Usage Set environment variable (add Phpexcel) The code is as follows Copy Code Set_include_path ('. ') Path_separator. Yii::app ()->basepath. ' /lib/phpexcel '. Path_separator.Get_include_path ());Note: In

Introduction to PHP and browser caching mechanism

HTTP headers: Connection keep-aliveDate Sun, 18:00:36 GMTLast-modified Sun, 17:31:02 GMTEtag EC1F629013925AB0FA4389BA926E8C06Keep-alive timeout=15, max=299Server apache/2.2.16 (Unix) DAV/2Vary accept-encoding Note that these two lines describe the

PHP error_reporting (e_all ^ e_notice) Error Report detailed description

An example is provided:In the Windows environment: Originally in the php4.3.0 of the program, in the 4.3.1 Why many errors, the general hint is: notice:undefined varialbe: variable name. For example, code that resembles the following:

PHP asynchronous invoke socket Simple instance

  code is as follows copy code ?$host = "Www.111cn.net";$path = "/report.php?" Reportid=1 ";$cookie = session_id ();$fp = Fsockopen ($host, $errno, $errstr, 30);if (! $fp) {Print "$errstr ($errno) n";Exit}$out = "Get". $path. "

PHP Upload Image code (while the picture is saved to the database)

ini

The code is as follows Copy Code Connecting to a database$conn = mysql_connect ("localhost", "phpdb", "phpdb");mysql_select_db ("Test", $conn);?>?Get the parameters of a Web page$id =$_post[' id ']; Determine if the user name

Using PHP to implement standard Ipwhois queries

Due to the historical reasons for the Internet, Apin is responsible for the overall network IP planning as well as the North American region also has some of Africa's IP allocation governance, and accordingly, whois.apin.net is the IP whois root

PHP and WAP

WAP (Wireless Communication Protocol) is an open global standard protocol for communication between digital mobile phones, personal handheld devices (PDAs, etc.) and computers. With the continuous development of wireless communications, static WAP

PHP Simple Text Counter [example of a File system based page counter]

file System-based page Counter example ? Php $countfile = "Num.txt";Defines that the file written by the counter is count.txt under the current directory, and then we should test whether the file can be openedif ($fp = fopen ($countfile, "r+"))

PHP Imap_open Instance Tutorial

IMAP connection server code. Connect an IMAP server link with an IMAP port of 143.$mbox = Imap_open ("{Localhost:143}inbox", "user_id", "password");Connection POP3 Server link, POP3 port is 110.$mbox = Imap_open ("{Localhost/pop3:110}inbox",

PHP Date Add minus

In asp,.net, date addition minus is a fairly simple datediff function to calculate how long the difference between two dates is, and when I learn PHP I think so, but completely different from what I think, the following is a friend wrote Php date

PHP class declaration and use method

/** explorer! function library* Date of preparation: 2008-06-29* Last update: 2008-07-18 2:08**/Class system{//System sectionfunction Usr_level ($name) {$SQL = new MySQL ();$SQL->query ("Select ' Level ' WHERE ' username ' = ' $name

JS adds data to select dynamically and is saved to data by PHP

Web Effects Add data to select dynamically and save to data by PHP;   Value one ? if ($_post) { $value = $_post[' select ']; Echo $value; Save Database Tutorial Operations } ?>

PHP json_encode () function json does not escape Chinese characters solution

If you call the json_encode () function that comes with PHP, when you encounter a Chinese character, the Chinese character will be escaped. For example:Echo json_encode (array (' '));// Output: ["\ u4f60 \ u597d"]This is very annoying, like a bunch

Php is_array Array Notice: Array to string conversion

Example$ Str = preg_match_all ('/( ).*? ()/is ', $ str, $ array );If (is_array ($ arrayList [0]){}Result discoveryNotice: Array to string conversion in E: \ get_data.php on line 45Notice: Undefined variable: Array in E: \ get_data.php on line

Common methods for submitting post and post php ajax data

Below is a standard ajax request code. Normally there will be no problems,... In specific circumstances, problems may occur. For example, when username = fdas & 321, or the & symbol appears in the parameter value, in order to find this problem, I

Iis + php prompts An error occurred on the server when processing the URL

A few days ago, I helped my friend solve the MSSQL database connection problem after the website was migrated. Then I set up its code locally to test the environment and found an ASP problem and solved it, it also helped my friend solve the problem.

Php prompts Parse error: syntax error, unexpected T_ENDWHILE in

Symptom:1. The same code runs normally on some machines, but an error is reported when running on specific machines.2. Some pages of the same site are displayed normally (for example, ), However, when you open some pages, phpxx_errors.log or the

Total Pages: 12780 1 .... 3167 3168 3169 3170 3171 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.