Q & A for beginners of PHP (1)

1. Q: Why does "APACHE. EXE: cannot determine local host name." appear ."?A: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 under the

Implement Multi-level tree menu with PHP

// Tree directory structure template program// Menu directory Field description:// Menu_id menu Project id// Menu name// Menu_grade Level 1: Main Menu 2: Level 2 ........// Menu_superior top-level menu idFunction my_menu ($ menu_content, $ I, $ menu_

Library management procedure (1)

The data table structure used by the Program:#--------------------------------------------------------## Structure of a data table 'autor'#Create table author (Author_id int (6) DEFAULT '0' not null auto_increment,First_name varchar (20) binary not

Full-text search and replacement

Exec ("/bin/grep-R' $ oldword' $ rootpath", $ results, $ errorCode );If ($ errorCode ){If ($ errorCode = 1 ){Echo "Possibly no files were found with $ oldword in them \ n ";}Echo "OS Error: $ errorCode \ n ";Echo "Check 'man errno' and count down

Use PHP to generate a dynamic image

Many people do not know that PHP can generate non-HTML data. This is very useful for generating Image graphs. It can generate a simple ad horizontal chart from the database or simply generate only one graphic button.I use TTF in the following

Example of creating a graph counter using PHP

I have seen many such examples in Oracle before. The methods are complex. See the following example to implement a graphic counter. Use // Stores counted text files$ Count = "count.txt ";// The number of counters. If not specified, the default value

PHP age calculation function (precise to day)

Copy codeThe Code is as follows:/*** PHP age calculation function** Parameters support parameter passing by array and standard Mysql date* Params sample*--------------------------------------------------$ BirthArr = array ('Year' => '123 ','Month' =>

Processing Procedures for NPC deputies to the people's congress (Supplement)

Note:1. The process of copying data by the National People's Congress is a set of programs used by myself. Because I saw a discussion on full-text retrieval on the Forum, I did not care about the cainiao-level gap in programming and published it to

Community (php & amp; mysql) 5

Function post2 (){Global $ sid, $ aid, $ PHP_SELF;Global $ banner, $ body, $ poster, $ email, $ type, $ CHAR_GB;If (strlen ($ banner) = 0 | strlen ($ body) = 0 | strlen ($ poster) = 0 | strlen ($ email) = 0 ){Echo"";Return;}// $ Banner = AddSlashes (

Use PHP to create a static website template framework (1)

Templates can improve the website structure. This article describes how to use a new function and template class of PHP 4 to skillfully control page layout in a website composed of a large number of static HTML pages.Outline:=========================

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

The difference between the register_globals parameter in PHP is OFF and ON (register_globals usage details)

The value of register_globals can be set to: On or Off. Let's take a piece of code to describe their differences.Code:Copy codeThe Code is as follows: When register_globals = Off, when receiving the next program, use $ _ GET ['user _ name'] and $ _

Php curl Common Errors: SSL errors, bool (false)

Symptom: An error occurred while calling https in php curl.Troubleshooting method: Use curl in the command line to call it.Cause: the SSL certificate cannot be verified in the server room.Solution: Skip the SSL certificate check.Curl_setopt ($ ch,

How to Use phpmyadmin to set mysql Database User Permissions

1. install and configure phpMyAdmin on the serverFor the installation configuration method, see: http://www.jb51.net/article/15330.htmAfter installation, go to the phpMyAdmin homepage, as shown in: 2. Create a user (this step can be omitted if you

Php deletes page records and refreshes the page deletion conditions. GET is used to obtain the deletion conditions.

Function:1. query data is displayed on a page, and the delete function is added after each data entry. Click "delete" to delete the data and refresh the page.2. GET deletion ConditionsDatabase Connection variable connectvars. phpCopy codeThe Code is

PHP object-oriented concept

Keywords and special Variables New, class, extends. Everyone knows about these three items.:, The range resolution operator (also known as Paamayim Nekudotayim) or, more simply, a colon, can be used to access static members, methods, and constants.

Introduction to strtr functions in PHP (str_replace)

Strtr has two forms:String strtr (string $ str, string $ from, string $)String strtr (string $ str, array $ replace_pairs)When the first type is used, the string length of the parameter $ from and $ to must be the same; otherwise, the extra

Prompt for php to convert time difference to string

This looks more user-friendly. Okay, go to the code.Copy codeThe Code is as follows:Class timeAgo{Static $ timeagoObject;Private $ rustle;Private $ unit;Private function _ construct (){}Private function _ clone (){}Public static function getObject ()

PHP implementation code for downloading images to a local place using regular expressions

Copy codeThe Code is as follows:/*Author: ssh_kobeData: 20110602Snapshot age: if the image path on the webpage is not an absolute path, it cannot be captured.*/Set_time_limit (0); // capture is not subject to the time limit$ URL = 'HTTP: // pp.baidu.

Php code for converting time difference to string prompt

Such as WeiboThis looks more user-friendly. Okay, go to the code.Copy codeThe Code is as follows:Class timeAgo{Static $ timeagoObject;Private $ rustle;Private $ unit;Private function _ construct (){}Private function _ clone (){}Public static

Total Pages: 12780 1 .... 10242 10243 10244 10245 10246 .... 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.