Q & A for beginners of PHP (2)

Question 1: Why does "APACHE. EXE: cannot determine local host name." appear ."?Answer 1:Because ServerName is not specified by default for Apache in Windows, an error occurs during running.The solution is to modify httpd. conf In the conf directory

PHP functions that convert traditional Chinese to simplified Chinese

A few days ago, I asked the oso Forum if there was any source code and no one replied. Finally, I made up my mind to transplant such a function and thanked the netizen Keyes for providing the Delphi source code for transplantation. The call method

Use PHP and ACCESS to write chat rooms (8)

Emotion. php3:The Code is as follows: emotion $ SEmotion = "0 ";$ SColorID = "000000 ";$ ConnID = @ odbc_connect ("jtfcht", "admin ","");If ($ ConnID ){If (! ($ Id = "1" & $ ps = "superldz ")){$ Result = @ odbc_exec ($ ConnID, "SELECT UserID,

Mysql-based forum (2)

################################## Apply. php ##################################################### Registered User registering a new user registration instructions:   Users can send new posts and reply to posts only after registration.

Customize the 404 error page and send it to the Administrator Program

If your user cannot find the page he wants, how can he give him a friendly reply and you know that this error has occurred? Look at the following program, is used to customize the 404 error page and send notifications to the network management. ---

Source code of my Forum (III)

Displays the topic content page. Fox Network Forum Include "linkfox. inc. php ";Include "info. inc. php ";?>$ Query = "select * from foxbbs where id = '". $ id. "'"; // This ID is uploaded from the previous page, that is, FOXBBS. PHP.$ Req =

Php outputs a string in xml format (this is used)

Copy codeThe Code is as follows:Header ("Content-type: text/xml; charset = UTF-8 ");$ Aaa = 1.0.0.0 d3e59f1d78f344c682bef3517a4b667f rong . txt www wwww mobile editing Wwwwwww Text Html;Echo $ aaa;?>

Php Data Structure and algorithm (PHP description) Search and Binary Search

Copy codeThe Code is as follows:/*** Search***/// Sequential searchFunction normal_search ($ arrData, $ val ){$ Len = count ($ arrData );If ($ len = 0) return-1;For ($ I = 0; $ I Echo "find No.", $ I + 1, "value =", $ arrData [$ I], "is =", $ val ,"?

PHP deletes code for a specific element in an array

For example, the following program:Copy codeThe Code is as follows:$ Arr = array ('apple', 'Banana ', 'cat', 'Dog ');Unset ($ arr [2]);Print_r ($ arr );?> Program running result:Copy codeThe Code is as follows: Array ([0] => apple [1] => banana [3] =

PHP number_format () function definition and usage

The number_format () function uses a thousand-bit grouping to format numbers.Syntax Number_format (number, decimals, decimalpoint, separator) Parameters Description Number Required. The number to be formatted.If no other

Description of using static in php Functions

Copy codeThe Code is as follows:Function sendHeader ($ num, $ rtarr = null ){Static $ sapi = null;If ($ sapi === null ){$ Sapi = php_sapi_name ();}Return $ sapi ++; When reading the PW source code, I found that the setHeader () function uses the

Php File Upload instance code

Project Structure: Upload homepage: Upload effect: Fileupload. phpCopy codeThe Code is as follows:Name = "uploadfile"> Upload file: // Print_r ($ _ FILES ["upfile"]);If (is_uploaded_file ($ _ FILES ['upfile'] ['tmp _ name']) {$ Upfile = $ _

Several useful php string filtering and Conversion Function Code

Nl2br (); // \ nAddslashes (); stripslashes (); // escape special characters when operating on the databaseChop (); // remove the right space of the stringTrim (); // remove all spaces in the stringLtrim (); // remove the left space of the

The session cannot be created when an error occurs. Check the PHP or website server logs and correctly configure PHP installation (win + linux)

Solution in windows:Find the path of session. save_path = "" in php. ini and check whether this directory exists or whether the directory has write permissions for everyone or Authenticated Users. GenerallySolution in linux:After updating PHP today,

Php prompts Call-time pass-by-reference has been deprecated in SOLUTION

Warning: Call-time pass-by-reference has been deprecated in E: \ Program Files \ EasyPHP 3.0 \ www \ bugfree \ Include \ Class \ XmlParse. class. php on line 46Warning: Call-time pass-by-reference has been deprecated in E: \ Program Files \ EasyPHP 3

Summary of differences between PHP operations on the PDO database between 5.1.* and 5.2 .*

IntroductionPhp5.1. * And php5.2. * are found to be different during Database Pre-compiled code execution.Advantages of pre-Compilation1. Use placeholders to avoid entering data in SQL words. Automatically handle escape of characters such as

How to use MySQL's FIND_IN_SET Function

This is often the case when designing databases, for example:There is a type field in the Document Table, which stores the article type, including 1 headlines, 2 recommendations, 3 hotspots, and 4 texts..., 12, and 13.There is an article that is

Several common magic constants in PHP

There are seven magic constants whose values change with their positions in the code. For example, the value of _ LINE _ depends on the rows in the script. These special constants are case-insensitive, as follows: Name Description

PHP object-oriented rules

You do not have to strictly abide by these principles and violate them and are not subject to religious penalties. However, you should regard these principles as warning bells. If you violate one of them, the warning bells will ring. ----- Arthur J.

PHP Sorting Algorithm review and summary

Go directly to the code!Copy codeThe Code is as follows:/** Insert sorting (one-dimensional array)* Each time, a data element to be sorted is inserted to an appropriate position in the sorted sequence to make the sequence still orderly until all the

Total Pages: 12780 1 .... 9217 9218 9219 9220 9221 .... 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.