Basic PHP knowledge: basic function knowledge

Function, all languages are available, so here only focus on: 1> definition: php does not need to define the return value type.2> the function name is case-sensitive. However, when calling a function, it is usually defined in the same format.3>

Automatically generate the document summary code [PHP version]

Implementation content: truncate a section containing HTML Code But there is no issue that the containment mark is not closed. Note: This is a PHP version used on the server. If you need a Client Version, read the next article. We are writing a

PHP and SQL injection attacks [3]

These days are too busy to continue the serialization. Haha, we will try to end in half a month. As mentioned above, the insecure input filtering function provided by the database is not available in all databases. Currently, only MySQL, SQLite,

Prevention of PHP and XSS cross-site attacks

In fact, this topic has been mentioned for a long time, and many PHP sites in China are found to have XSS vulnerabilities. I accidentally saw an XSS vulnerability in PhP5 today. Here is a summary. By the way, it is recommended that you use PhP5 to

Random ad display Code implemented using PHP

######## Random ad display ########## Function myads (){ $ Dir = "ads"; # Set the directory for storing records // $ Dir = "ads"; # Set the directory for storing records $ Ads = "$ DIR/ads.txt"; # Set ads Code File $ Log = "$ DIR/ads. log"; # Set

Best PHP configuration method for IIS 6

Author: indifference Although the LAMP combination is good, if you want to set up a Web virtual host server that supports both PHP, ASP, ASP. NET, JSP, and Perl, Windows 2003 IIS 6 is the best. There are many articles on how to configure PHP on IIS 6

Time Display in php

Method 1: // List ($ first, $ second) = explode ("", $ date_temp ); // Echo $ first; // Echo substr ($ first, 2) Method 2: // Echo date ("Y-m-d", strtotime ($ date_temp )); Method 3: Echo substr ($ date_temp, 0, 10). " "; // When Members

Serv-U.php: light in the dark

These days are boring and there is nothing to do. It happens that a new website has been launched by a friend. Let me check it and test the security of the website. First, I looked at the website structure and layout. I felt that the whole site

FCKeditor installation (PHP)

1. download the latest FCKEditor and decompress it. 2. Delete all files except fckconfig. js, FCKeditor. js, fckstyles. xml, fcktemplates. xml, and fckeditor. php In the/fckeditor/directory. Delete the directory/editor/_ source, _ testcases

Php template technology recommended

SITE STRUCTURE Code:SiteRegionregiondesCATEGORY class. inc┣ Templet┗Index.htm┣List.htm┗Content.htmUsing index. phpInvalid content. phpDatabase Structure Code:-- Database: 'test'-- Table structure 'test'Create table 'test '('Id' smallint (3) not

Post several PHP unlimited classification implementation ideas ~

1,Websites generally encounter classification problems. I will occasionally post several examples to process unlimited classification. The database structure is simple: Id, fatcher_id, name ,...... This design is short and concise, fully satisfying 3

AJAX for PHP simple table data query instance

Function Introduction: AJAX WebShop 3 has supported PHP development since Beta2. AJAX WebShop integrates the development environment of PHP5, so you do not need to install and configure PHP, in this example, an AJAX for PHP simple data query

Ajax PHP paging demonstration

Today, let's look at the pagination in silence. Think about it as if no post has been posted in the original area for a long time. Let's extend it to a PHP + AJAX paging demonstration by the way. Okay, let's talk about it, first, we are still the

[Php] Code for implementing paging effects like GOOGLE

Function used: PAGE (); Function page ($ totalPage, $ currentPage, $ url, $ halfPer, $ imagePath) { $ Total = $ totalPage; $ CurrentPage = ($ currentPage $ CurrentPage = ($ currentPage> $ totalPage )? $ TotalPage: $ currentPage; // Echo $

A favorite php thief's core program

Ob_start (); Ob_implicit_flush (0); Function CheckCanGzip (){ Global $ HTTP_ACCEPT_ENCODING; If (headers_sent () | connection_timeout () | connection_aborted ()){ Return 0; } If (strpos ($ HTTP_ACCEPT_ENCODING, 'x-gzip ')! = False) return "x-gzip "

Dirname (_ file _) in PHP

It is usually very effective to use dirname (_ FILE _) When configuring the FILE path, however, because the path of _ FILE _ is the complete path of the FILE where the current code is located (rather than the FILE where the url is located), the

Code for generating an html paging list using PHP

$ Db = mysql_connect ("127.0.0.1", "root", "********") or die ("cant't connect host "); $ Re = mysql_select_db ("t", $ db) or die ("can't open database "); $ SQL = "Select * FROM news ";$ Res = mysql_query ($ SQL );$ Row = mysql_num_rows ($ res ); $

Use PHP to generate a static HTML library with High Speed

Copy codeCode: ob_start (); # enable server Cache Include_once 'index. php '; $ Ctx = ob_get_contents (); # Get Cache Ob_end_clean (); # Clear the cache $ Fh = fopen ("index.html", "w + "); Fwrite ($ fh, $ ctx); # write html to generate html Fclose (

Add a php watermark to your image at any time

Add text to your image at any time Header ("Content-type: image/jpeg "); Function makethumb ($ srcFile, $ text, $ size = 12, $ R = 0, $ G = 0, $ B = 0 ){ If (! $ Text ){ $ Text = 'Welcome xs.net.ru xayle '; $ Size = 20; $ R = 255; } $ Data =

PHP operation file method Q &

PHP operation file Q & Preface: PHP supports operations on various types of databases, and also provides rich operation methods for file operations, many of my friends are still operating on files, but sometimes there are still many puzzles and

Total Pages: 12780 1 .... 9253 9254 9255 9256 9257 .... 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.