PHP website Installation Implementation program

This time by doing a install.php to find that the difficulty is actually not big, or file write operation, installation in fact, the main operation is still the contents of the database, first to see how the file to write: (or the use of codeigiter,

An example of an array of PHP to convert XML to XML

PHP Array to XML The code is as follows Copy Code function Array2xml ($array, $xml = False) {if ($xml = = False) {$xml = new SimpleXMLElement (' ');}foreach ($array as $key => $value) {if (Is_array ($value)) {Array2xml ($

PHP Object-oriented __call handling error invocation technique

Before referring to __call, take a look at the test results of an instance to better understand the role of the __call method. Code on: A system error occurs when a method that does not exist in the calling object is invoked, and the program exits

Method of automatically loading class __autoload () in PHP

Function: When you need to instantiate a class in your program, just like this one is not in this file, you need to include the external file with the Include function. However, when you want to use a lot of external classes, you will find that the

PHP file directory operation function Learning notes

File action functions 1, Get filename: basename (); 2, get the file directory: DirName (); 3, PathInfo () Get the file information, return the result is an array, including path, file full name, file name and extension. For example:

The difference between PHP memcache and memcached

The first thing to be sure is that you must open the Memcached service to use the Memcache and memcached PHP APIs. So what's the difference between these two APIs for memcached services? 1.memcache is the extension of PHP itself, and memcached

Whois's PHP code

This is the code for WHOIS lookup.   ? function Whois_request ($server, $query) { $data = ""; $fp = Fsockopen ($server, 43); if ($fp) { Fputs ($FP, $query. " RN "); while (!feof ($fp)) { $data. = Fread ($fp, 1000); } Fclose ($FP); } return $data; }

PHP and Java (ii)

Author: Well Middle Moon Example 1: Creating and using your own Java class It is easy to create your own Java class. Create a new Phptest.java file and place it in your Java.class.path directory, which reads as follows: public class phptest{ /** *

PHP calculates the distance between two coordinates (longitude, latitude)

Example One function distance ($lat 1, $lng 1, $lat 2, $lng 2, $miles = True){$pi = m_pi/180;$lat 1 *= $PI 80;$LNG 1 *= $PI 80;$lat 2 *= $PI 80;$LNG 2 *= $PI 80;$r = 6372.797;$dlat = $lat 2-$lat 1;$DLNG = $lng 2-$LNG 1;$a = sin ($dlat/2) *sin

PHP anti-Cross station attack Test example (for learning to use)

Code is the best language. The code is as follows Copy Code #demo for Prevent CSRF /*** ENC*/function Encrypt ($token _time) {return MD5 ('!@##$@$$#%43′. $token _time);} $token _time = time ();$token = Encrypt ($token

PHP security Vulnerabilities $_server[' php_self ']

$_server[' php_self '] is often used in development, commonly used to refer to the current page address, and it is the system automatically generated global variables, also have any problems? Let's look at the following code first: ">This code is

PHP and XSS cross-stop attacks

How to attack, do not explain this (also do not ask me), mainly talk about how to prevent. First, cross-site scripting attacks are due to the lack of strict filtering of user input, so we have to intercept the possible dangers before all data enters

Examples of PHP MAGIC_QUOTES_GPC switches

If the MAGIC_QUOTES_GPC in the php.ini file of your Web site is set to OFF, PHP will not precede the sensitive character with a backslash (\), because the form submission may contain sensitive characters, such as single quotes ('), which causes the

Php character encoding and conversion code

There are various types of codes commonly used in development, such as uft8-> gbk to utf8 traditional to simplified to traditional utf8 to unicode gbk to pinyin Ascii to pinyin, etc./*** Utf8 to gbk* @ Param $ utfstr*/Function utf8_to_gbk ($ utfstr )

Description of the urlencode () function in php

Urlencode () function description in the php TutorialURLEncode: a pointer to the Chinese characters in the url of a web page. The most common method is to enter Chinese characters in search engines such as Baidu and Google, generate a webpage URL

Php setcookie introduction and instance application

The cookie name is a variable with the same name. For example, if the sent cookie is named "name", a variable named $ user is automatically created, containing the cookie value.The cookie must be assigned a value before any other output is sent.If

Php hexdec () and dechex () hexadecimal conversion to decimal interchange

The hexdec () function converts hexadecimal to decimal.SyntaxHexdec (hex_string)Echo hexdec ('77 '); // output 119Echo " ";Echo hexdec (dechex (43); // output 43Echo " ";Echo hexdec ('3a '); // output 58The dechex () function converts decimal to

Php 301 redirection code

PHP generates Chinese verification code garbled problem (1/2)

// The Chinese character to be processed, which is converted from the UTF8 Chinese character to the html entity before being used.// Sample code: The code is as follows:Copy code // Ini_set ('jis-mapped Japanese Font Support ', false );$ Pic =

An error occurred while uploading the image in php.

An error occurred while uploading the image in php.Generally, unless the file is very small, it is like a 5 MB file. It may take more than one minute to complete the upload.However, in php, the longest execution time of the page is 30 seconds by

Total Pages: 12780 1 .... 4445 4446 4447 4448 4449 .... 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.