This article introduces in detail the generation mechanism of the session in PHP, the recovery mechanism and the relevant knowledge of the storage mechanism, in-depth understanding of the PHP session operation mechanism, the need for a friend
Connecting to a database
$con = mysql_connect ("localhost", "root", "");
mysql_select_db ("Xueshengchu", $con);
mysql_query ("Set names UTF8");
$pageSize = 5; Shows the number of data bars per page
$result =
Copy Code
Class subpages{
Private $each _disnums;//The number of entries displayed per page
private $nums;//Total number of entries
Private $current _page;//the currently selected page
Private $sub _pages;
$nav = ";//A variable to hold the number of pages
for ($i =1; $i
{
$nav. = "No.". $i. " Page ";
}
Copy CodeThe For loop above will output such as page 1th, page 2nd, 3rd page, 4th page, 5th page, 6th page, 7th
function Checkimagesize ($ImageFileName, $LimitSize)
{
$size =getimagesize ($ImageFileName);
if ($size [0]> $LimitSize [0]| | $size [1]> $LimitSize [1]) {
Echo ' Sorry, the size of the image you want to upload is too
1. This year's schedule is out. The PHP 7 schedule RFC vote has been passed, and PHP 7 will be released in October 2015. Despite some delays, we are glad that it was released this year. PHP 7 Detailed schedule from this view. 2. PHP is going aboard
/* 1.jpg to get a picture of its size */
$arr = getimagesize ("1.jpg");
/**
* $arr as an array type
* $arr [0] is the width of the image
* $arr [1] is the height of the image
* $arr [2] format for images,
php How to upload files to the database, here to share a few examples, to master the php file saved to the MySQL database method, how to let PHP upload files into the database instance code.
php uploading files to the database is nothing
/* 1.jpg you want to get a picture of its size * *
$arr = getimagesize ("1.jpg");
/**
* Here $arr for an array type
* $arr [0] is the width of the image
* $arr [1] is the height of the image
* $arr [2] format for
$img = ' 22.jpg ';
$arr =getimagesize ($IMG);
Print_r ($arr); $arr [0] for the width of the picture, $arr [1] for the height of the picture, $arr [2] for the type of the picture, that is, the extension of the picture,
Switch ($arr [2])
/* 1.jpg to get a picture of its size */
$arr = getimagesize ("1.jpg");
/**
* Here $arr for an array type
* $arr [0] is the width of the image
* $arr [1] is the height of the image
* $arr [2] format for images,
Class Pagemodel {
/**
* Get the number of page groups
* @param unknown $page current page number
* Total number of items @param unknown $goodsCount
* @param unknown $pageLength The number of pages displayed per page
*/
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