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

Convert data from Excel to mysql with 20 rows of statements

Since I had some knowledge of php and mysql, I have been very keen on my company's huge Excel database and want to secretly "share" the confidential commercial data, while thinking about how to get it, thinking about how to convert it into a mysql

Paging code for text message book

// When writing a file, use "|" to separate each record. "|" is used to separate fields in the record.// If record 1 is $ str1 = $ name. "| ". $ pass. "| ". $ title. "| ". $ message. "| ". .........// Connect to record 1 and record 2, $ str = $ str1.

Session on setting up a PHP personal website (4)

Three homepage news publishing makes it easier for you to update (below)----- In the previous lecture, we have implemented the basic functions of homepage News Publishing. In this lecture, we will add more bricks and tiles to make it more powerful. (

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

An example of capturing information from another website (domain name query)

If (isset ($ xx )){$ Dodo = @ file ("http://www.e9china.com/cgi-bin/comdns.pl? Raw = 1 & lookup = OK & fqdn = ". $ fqdn. "& domain = ". $ domain. "& root = ". $ root. & cdomain = 2.7 ");$ I = 0;While ($ dodo [$ I]) {Echo $ dodo [$ I];$ I ++;}Exit;}?>

PHP expert path (3)

Use str-replace instead of ereg-replaceProgrammers who are familiar with Perl programming are more willing to use ereg_replace to complete string replacement, because the usage of ereg_replace in PHP is similar to that of pattern matching in Perl.

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

How php generates static files

First: generate static php dynamic page contentCopy codeThe Code is as follows:Ob_start (); # enable server CacheInclude_once 'index. php ';$ Ctx = ob_get_contents (); # Get CacheOb_end_clean (); # Clear the cache$ Fh = fopen ("index.html", "w +

Summary of MySQL Date and Time Functions

Obtain the current date + time (date + time) 1.1 function: now () Related functions: current_timestamp (), localtime (), localtimestamp () Example: 2. Get the current date) Function: curdate () Related functions: current_date (),

How to synchronize multiple resources

Call multiple resources at a time, and then perform different processing on the same website one by one, the last "same time" parameter update or insert. The update and insert data records received for each item are not the same! ====================

Php paging ideas and use in ZF

You only need to get two variables to get half done:Number of records to be displayed per page $ pageSizeTotal data volume in the table $ rowCountWith the above two variables, we can get a total of several pages. $ pageCountThen, through the for

Three methods for php redirection

1. Use HTTP header informationThat is, use the php header function. The HEADER function in PHP is used to send control commands that should have been specified by the HTTP protocol to the browser through the WEB server. For example, to declare the

Php & amp; mysql date Operation Note

Int efficiency is significantly higher when the query time is compared. Xiang Wen see http://www.jb51.net/article/29767.htmHowever, when you are working on a project or directly viewing data in the database, it is obvious that the int value is big

Php online mall promotion design instance code

The general idea is that a promotion class should be created for each promotion, and a special switch is provided to control whether the promotion is effective.Use the sales identification code in the product to determine which sales promotion

PHP code for the remainder Function

Copy codeThe Code is as follows:// Obtain the value in the base space.Function getRemainder ($ num, $ bin, $ pos, & $ result = 0 ){// Author lianq.net// $ Num value, decimal// $ Bin: The hexadecimal format to be converted// $ Pos digits$ Real_len =

Add one or more elements (in the stack) to the end of the array_push () array of the php Array Function sequence, and return the new length.

Array_push () Definition and usageThe array_push () function adds one or more elements (in the stack) to the end of the array of the first parameter, and returns the length of the new array.This function is equivalent to calling $ array [] = $ value

Differences between iconv and mb_convert_encoding encoded strings in php

Iconv-Convert string to requested character encoding (PHP 4> = 4.0.5, PHP 5)Mb_convert_encoding-Convert character encoding (PHP 4> = 4.0.6, PHP 5)Usage:String mb_convert_encoding (string str, string to_encoding [, mixed from_encoding])Enable the

Use of the linux iconv Method

According to the phpinfo information, the iconv module has been correctly loaded.Google. It turns out that the iconv method in linux is still a bit problematic.The solution provided by a user on csdn is:View sourceprint? One way is to change iconv

PHP implementation code for refreshing new file uploads

Index.htmlCopy codeThe Code is as follows: resumable upload of files Upload. phpCopy codeThe Code is as follows:Sleep (2 );$ FileTypes = array ('jpg ', 'png', 'gif', 'bmp ');$ Result = null;$ UploadDir = './upfiles ';$ MaxSize = 1 * pow (2, 20

Total Pages: 12780 1 .... 7141 7142 7143 7144 7145 .... 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.