Learning the fwrite function of php
This article introduces the usage of the fwrite function in php for your reference. The PHP fwrite () function is used to write strings to a file. the number of written characters is returned. otherwise,
The file size in bytes is converted to an appropriate unit.
Someone has shared code like this. Share a piece of code that supports any large number and is quite simple.
Function formatFileSize ($ fileSize)
{
$ Unit =
A simple PHP access counter
// Start at the top of the page since we start a session
Session_name ('mysite _ hit_counter ');
Session_start ();
//
$ Fn = 'hits_counter.txt ';
Method 2 of tree traversal
A non-recursive depth-first algorithm is implemented using a stack.
Define ('Ds', DIRECTORY_SEPARATOR );
Function deep_first_list_files ($ from = '.')
{
If (! Is_dir ($ from )){
Php implements five basic operations on text databases: data display, addition, modification, deletion, and query.
Php implements five basic operations on text databases: data display, addition, modification, deletion, and query.This text
Capacity formatting function
It's a very simple piece. nothing to say ..
/**
* Capacity formatting
*
* @ Param Int $ filesize
* @ Return Srting
*/
Function sizecount ($ filesize)
{
If ($
A Practical php paging class
/*
Functional and practical php paging class
Subpages
*/
Class SubPages {
Private $ each_disNums; // Number of Entries displayed on each page
Private $
Php code: php code converts a full-width number into a half-width number: converts a full-width number into a half-width number functionGetAlabNum ($ fnum) {$ numsarray, 8, 9 ,., -, +, :); $ fnumsarray ,., -, + // Convert the full-angle number into
Photoshop learning: photoshop learning PHP learning operator and operator priority: arithmetic operator name result $ a + $ B addition $ the sum of a and $ B and $ a-$ B subtraction $ the difference between a and $ B $ a * $ B multiplication $ a and
Infinitus China Ltd.: Infinitus China Ltd. php Infinitus classification: Copy the code as follows: & lt ;? Php * class name: catalog function: unlimited classification class method: tree display category catalog_show ($ id) parameter $ id recursive
Sprintf: sprintfphpsprintf function makes your SQL operations safer: $ bookSQLsprintf (UPDATEbookSETpass % sWHERE, GetSQLValueString ($ _ POST [list], text), GetSQLValueString ($ _ GET [id], int); Ge $ bookSQL = sprintf ("UPDATE book SET pass = % s
Add a watermark: The PHP class used to add a watermark to an image: Copy the code as follows: & lt ;? Php ** function: PHP image watermark (Watermark supports images or text) * parameter: * $ groundImage background image, that is, the image to be
: This article describes how to enable PHP to support Redis. if you are interested in the PHP Tutorial, refer to it. Principle: php default extension library does not include redis extension; to support redis extension, you need the extension file
: This article mainly introduces the stickUp jQuery plug-in. if you are interested in the PHP Tutorial, refer to it. This is a simple jQuery plug-in that allows the target page element to be "fixed" at the top of the browser window. even if the page
: This article mainly introduces how to install PHP55 and phpredis extension in YUM. if you are interested in PHP tutorials, refer to it.
# Yum install php55-php.x86_64 php55-php-cli.x86_64 php55-php-common.x86_64 php55-php-devel.x86_64
: This article mainly introduces the study notes of Zhimeng imitation station (1). If you are interested in the PHP Tutorial, refer to it. [PHP] study notes of Zhimeng imitation station (1)
The counterfeit site is a copy of the target website.
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