An example
1, index.php
detect the length of the string
cellspacing= "0" >"" Username :"Src= "Images/btn_dl.jpg" width= "height=" border= "0" >" Password :"* password length cannot be less than 6 digits"
2, index_ok.php
if (strlen ($_post["
Basic syntax:
Const constant NAME = value;
How to access:
Class Name:: Constant Name or interface name:: Constant Name
Attention:
1 The constant name should be all uppercase, and the preceding cannot have the $ symbol, the constant must have an
01.02.header (' CONTENT-TYPE:TEXT/HTML;CHARSET=GBK ');03.date_default_timezone_set (' PRC ');$n =CHR (13);05.echo "" $n;56.?>
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/PHP/
Cdetailview displays details for a model. The model to be displayed can be either a cmodel or an associative array.
Cdetailview configure attributes to determine which properties of the model need to display in what format.
Each property can be
The process Control of PHP includes three kinds of sequential structure, branch structure and cyclic structure. The branching structure includes an if statement and a switch statement. Loop structure includes for loop, while loop, Do-while Loop, in
Introduction: Learn about the SimpleXML extension bundled with PHP version 5, which enables PHP pages to query, search, modify, and redistribute XML in PHP-friendly syntax.
PHP version 5 introduces SimpleXML, a new application programming interface
Jacques Noah published an article on devshed about creating a PHP-based RSS reader in PHP4 with any version of MySQL, with three main tags in the RSS document: Title,link and Description, contain the same information as their name hints.
Jacques
Last year, the development of an OA system, need to implement a key document upload and realize online preview, similar to the function of Baidu Library.
System Environment: CentOs5.5
Tools used: Openoffice 3, pdf2swf tool, Jodconverter, Flexpaper
1.imagecolorallocate
Syntax: int imagecolorallocate (int im,int red,int green,int blue)
The function is to set the RGB mode color in the IM-represented image, the return value is an identity that uniquely determines the color of an IM image, and
Extracts a function from the Gregarius. You can automatically convert a relative path in a Web page to an absolute path.
?function Relative_to_absolute ($content, $feed _url) { Preg_match ('/(HTTP|HTTPS|FTP): \/\//', $feed _url, $protocol); $
We generally implement the download is to call the URL to download, but encountered IE can identify open files can not be used in this way, such as downloading a picture, HTML page, etc., then need to program to achieve, the following PHP code can
GeSHi is a powerful language color-rendering plug-in that allows you to display language colors in the PHP code section of your article
First, the simplest way to do this is to call the main file first geshi.php
$geshi = new GeSHi($con,
The Xdebug extension of PHP can help you dissect your application to find out why when a program is wrong or fails. We can use Xdebug to trace call stacks, analyze memory usage, and view parameters and variables. The process of installing xdebug is
Today, I started to write some simple C examples, and found a lot of different places with PHP, make a note.#include int main (void){int A, B;printf ("Please enter integer a"); Here is the double quotation mark, cannot use single quotation mark, PHP
Summary of common database operations implemented by the Yii2 framework, and the yii2 framework
General:
use yii\db\Query;$query = new Query();
Query:
Query:
$rows = (new \yii\db\Query()) ->select(['code', 'name', 'population'])
Let's take a closer look at common PHP object-oriented keywords and magic methods.
Common keywords in PHP object-oriented
Final
1. final cannot modify member attributes (constants in the class do not use this keyword)
2. final can only modify
Use OpenSSL in PHP to generate certificates and encrypt and decrypt, and use openssl to encrypt and decrypt
Depends on OpenSSL Extension
/* Encryption and decryption */function authcode ($ string, $ operation = 'E') {$ ssl_public = file_get_contents
PHP regular match backslash '\' and dollar '$', php slash
This example describes the PHP Regular Expression matching method with the backslash '\' and dollar '$. We will share this with you for your reference. The details are as follows:
1. test.
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