For PHP ++i and i++ usage Introduction, the need for friends can refer to the next.For PHP ++i and i++ usage Introduction, the need for friends can refer to the next.1, the use of ++i (in A=++i, i=2 for example) First add the I value 1 (that is, i=i+
Assuming that the current file is stored under (d:\www\), the file name is test.php.Assuming that the current file is stored under (d:\www\), the file name is test.php.Copy the Code code as follows:
Note: dirname (__file__) takes the absolute
Zend Framework tutorial, running an example, reported the following error: The server encountered an internal error and is unable to complete your request. Either the server is overloaded or there be an error in a CGI script.Zend Framework tutorial,
/**
DES encryption and decryption
*/
Class Std3des
{
Private $key = "";
Private $iv = "";
/**
* Construct, pass two key and IV that have been base64_encode
*
* @param string $key
* @param string
$STR = ' Scripting Academy: http://bbs.it-home.org ';
Echo mb_substr ($str, 0,4, ' utf-8 ');//intercept the first 5 words, assuming that the code is located in the PHP file encoded as Utf-8
?>
Copy CodeOutput: Programmer's
/**
Features: Generating static pages
Collation: Scripting Academy bbs.it-home.org
Date: 2013-2-16
*/
Class HTML
{
var $dir; Dir for the htmls (without/)
var $rootdir; Root of HTML files (without/): HTML
/*
* Read the contents of the file into a string, while removing line breaks and line endings at the beginning.
*/
Header ("content-type:text/html; Charset=utf-8 ");
echo preg_replace ('/((\s) * (\ n) + (\s) *)/I ', ', ',
/**
@ Set and preserve the properties of the class
@ Class cleanhtml
@ link:bbs.it-home.org
@ DATE:2013/2/28
*/
function Reg_escape ($STR)
{
$conversions = Array ("^" = "\^", "[" = "\[", "." = "\.", "$" = "\$",
Class Arraytoxml
{
/**
* The main function for converting to an XML document.
* Pass in a multi dimensional array and this recrusively loops through and builds up an XML document.
*
* @param array $data
* @param
/*
mysql_pager.class.php
Three parameters: mysql_query () result, URL variable page, number of records per page you want
*/
Class Mysql_pager {
Define Properties
var $page;
var $result;
var $results _per_page =
$conn =mssql_connect ("Instance name or server IP", "User name", "password");
Test connection
if ($conn)
{
echo "Connected successfully";
}
Copy Code2. Select the database to connect to
When accessing a member variable or method in a PHP class, if the referenced variable or method is declared as const (defining a constant) or static (declaring static), then the operator must be used::, and vice versa.When accessing a member
/*
The solution to the characters of the @ characters in the Library
@bbs. it-home.org
*/
Include_once ("conn.php");
Include_once ("include.php");
mysql_query ("Set names ' GBK '") or Die ("set word repertoires failed \
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