PHP Learning (9)

Session_start (); start the session function $ _ server ["remote_addr"] is a command to obtain the IP address of the local machine. Session_register (""); is a function used to register a session variable. Isset ($ _ session [""]) is used to

Insert and display utf8 data in PHP

// Code $ con = mysql_connect ("127.0.0.1", "root", "943237") when the browser displays the page ");// Connect to the database if (! $ Con) {die ('could not connect: '. mysql_error ();} mysql_select_db ("DB", $ con );// Select database //

PHP design mode-policy Mode

The rule mode is the behavior mode of the object. Intended for a group Algorithm , Encapsulate each algorithm into an independent class with a common interface, so that they can be replaced with each other. The rule mode allows the algorithm to

PHP design mode-responsibility chain mode

Overview The responsibility chain mode is an object behavior mode. In the responsibility chain mode, many objects are connected by each object's reference to its next home to form a chain. Requests are transmitted on this chain until an object on

Comprehensive PHP character retrieval functions

The use of a few character functions such as mb_substr is not very easy to use, or this is more useful. /*** Truncation function to prevent garbled characters ***/function z_substr ($ sourcestr = '', $ I = 0, $ cutlength = 150, $ endstr = '') {$

A small example of recursive tree generation in PHP

Some people often ask the example of tree generation, in fact very simple, with a hand, even if throwing a brick it. csdn Forum address: http://topic.csdn.net/u/20081029/11/f2faab7f-f8fb-43a8-906a-a7bb83063515.html Header ("Content-Type:

Java senior engineer and Sun architect encounter PHP

At the end of April, our company "Xi 'an Jianfei software" was connected to a PHP project in Canada. This project is about online shopping. At first, Zheng Gong, who just returned from Japan, was appointed as the investigation and analysis director

Use of GD library in PHP

Some simple image functions can be directly used in PHP, but most of the images to be processed need to be added to the GD library during PHP compilation. In addition to installing the GD library, other libraries may be required in PHP, depending on

Submit array parameters in PHP post

  First, to transfer an array from a page to server a in PHP, multiple spaces on the page must have the same name, and the name must be "AA []", note that you need to add an array symbol so that it can be obtained on server, $_POST[aa] The result

PHP crawls Div content

1. Retrieve all images in the specified website: Zookeeper{ DP. Sh. toolbar. Command ('viewsource', this); Return false; } "Href =" http://writeblog.csdn.net/# "> opening a new window { DP. Sh. toolbar. Command ('copytoclipboard', this); Return

Class 'soapclient' not found in PHP

A "Class 'soapclient' not found" error occurred while running a Demo code today. After searching, you need to start the soap service, but in PHP. no soap is found in Windows extensions of ini. DLL. At first, I thought my PHP version did not contain

Original, simple PHP Train Timetable query Program

01. 02. // use a small program written by someone else's website to query train schedules 03. If (isset ($ _ post ['cx ']) { 04. // spell the URL to test whether the URL can be opened successfully 05. $ url = "http://wap.huoche.com.cn/chaxun/result.

Summary of PHP website collection over the past few days

Summary of PHP website collection over the past few days due to the efficiency of PHP operation, coupled with the wonderful cooperation of MySQL. Many people use it for websites. And its surface is also very good. Because it is an explanatory

[PHP] converting HTML to PDF

1. dompdf Dompdf is a conversion tool from HTML to PDF. Its core is a rendering engine that follows most css2.1 styles. Dompdf is style-driven. It can download and read external styles, the entire STYLE tag, and the style attributes of a single HTML

Useless for a long time -- PHP -- database connection class

?PHP/*File Name: database. phpRole: DatabaseAuthor: mr. boolCreated at: 2007.10.22Modification time: 2007.10.23*/Require_once("Config. Inc. php");// System Configuration File/*$ Dbhost = "localhost"; // host name$ Dbuser = "root"; // database

Simple, convenient, and fully functional PHP paging class

each_disnums = intval ($ each_disnums); $ this-> Nums = intval ($ Nums); If (! $ Current_page) {$ this-> current_page = 1;} else {$ this-> current_page = intval ($ current_page);} $ this-> sub_pages = intval ($ sub_pages ); $ this-> pagenums = Ceil (

Functions for removing HTML tags in PHP

Strip_tags Remove HTML and PHP tags. Syntax:String strip_tags (string Str ); Return Value: String Correspondence type: Data Processing   Description This function removes any HTML

PHP Regular Expressions

Operator description\ Escape Character(),(? :),(? =), [] Parentheses and square brackets *, + ,?, {N}, {n ,}, {n, m} qualifier^, $, \ Anymetacharacter location and Sequence| "Or" OperationAll symbolic interpretationsCharacter Description\ Mark the

PHP comparison operator bug

First of all, give a PHP sample code. If you fully understand why the following results appear, you do not need to waste time on this blog, this is to let PHP beginners pay attention to possible mistakes. If you are not too clear about the above

PHP Study Notes (2)-Database Operations

I have created two pages. text.html is a single page of a static table. input data in the text.html form. Then dB. php obtains the data in the form and inserts the data into the database for output to display on the page. Next, let's look at the

Total Pages: 12780 1 .... 10969 10970 10971 10972 10973 .... 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.