1. Create a canvas
$im = Imagecreatetruecolor (300,200);//Create a new true color image, the default background is black, return the image identifier. There is also a function imagecreate has not been recommended for use.
$red =
PHP recursive functions for the implementation of the method of digital accumulation, PHP recursion for the sum of the number of numbers summed up a small example, the recursive function of the return to the correct method of accumulating variables.
PHP how to generate a date timeline, PHP, a date function of the application instance, the Unix timestamp into the timeline, through this example can grasp the use of the date function.
Example, PHP time axis function code.Copy Codecode
$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
Use regular expressions to find and replace
First of all, I need to declare that the application of the regular is not particularly skilled, but in the work of "be forced helpless" only one step to the regular have some understanding. As we
mysql_connect ("localhost", "root", "1981427")//Connect to server on localhost, user name is root
?>
Copy CodeConnect and select a database
@mysql_select_db ("test")//Select Database MyDB
?>
Add picture watermark to background image (location random), JPEG for background image, GIF for watermark picture format
function watermark ($filename, $water) {
Get the width and height of the background picture
List ($b _w, $b _h) =
Teaches you how to open php files
Before answering this question, let's start by understanding what PHP is.PHP, is the abbreviation of English Super Text preprocessing language hypertext preprocessor. PHP is an HTML embedded language, is a
$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, including JPG, GIF, PNG, etc.
* $arr [3] is
/**
* Easy Paging class
* Page.class.php
*/
Class Page
{
Private $page _num; Number of information bars displayed per page
Private $page _all_no; Total number of messages
Private $page _len; How many page
FileName:rewrite.php
function: Rewrite all the HTM files in the xxx directory (also can be PHP files)
Author:windlike.cublog.cn
function GetFileInfo ($dir, $type) {
Global $arr _file;
$mydir = Dir ($dir);
while (false!==
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
*/
This article describes the correct use of return values in PHP recursive functions, and the use of return values in PHP recursive functions to pay attention to which problems to deepen the understanding of PHP recursive functions.
PHP
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