Php code
/**
* Function: generate a thumbnail.
* Author: phpox
* Date: Thu May 17 09:57:05 CST 2007
*/
Class CreatMiniature
{
// Public variables
Var $ srcFile = ""; // source Image
Var $ echoType; // The type of the output image, link -- not
Php.net recently updated the php document. It is useful to use the new pman tool. Pman is a command line tool that allows you to conveniently view the local help documentation for php functions, but does not contain comment data from php.net. The
Floor Rounding Method: float floor (float value)
Returns the next integer not greater than value and rounds the decimal part of value. The return type of floor () is still float, because the float value range is usually larger than that of integer.
I. How to define a constant
Keywords: define syntax define ('constant name', 'constant value ')
2. Array
1 Define an array
Keyword array syntax array (key => value, key2 => value2, key3 => value3) key can be an integer or string, and value
Recently, I used the zendframework as a project. I want to take out the data in the database and generate an XML document. Record the process here:
Xml file:
1.
2.
3.
4.
5.
6.
7.
8.
9.
1. Create testController. php and add
$ This indicates the specific object after instantiation!
We generally declare a class first, and then use this class to instantiate the object!
However, when we declare this class, we want to use the attributes or methods of this class in the class
// Time Conversion Function
Function tranTime ($ time ){
$ Rtime = date ("m-d H: I", $ time );
$ Htime = date ("H: I", $ time );
$ Time = time ()-$ time;
If ($ time
$ Str = 'gang ';
}
Elseif ($ time
$ Min = floor ($ time/60 );
$ Str = $ min. '
// The string with Chinese and English ASCII codes is cut into an array of single words
// Satan @ Author 2011-10-26
Private function chinesesplit ($ str ){
// $ Str = "x little girl went to kfc to eat chicken. The flying knife was shot. nobody
During project development, we often encounter a difference of 8 hours between the obtained time and the actual time, because our time zone range is different from that of the PHP developer, the default value is not UTC + 8. There are two
This afternoon, segmentfault.com asked a question titled "How To Make PHP service", asking if php can only be called on the web. In fact, many people have misunderstandings about the use of PHP, and think that php can only be used to write web
We use the MVC framework, such as CI, YII, and cakePHP. One of the reasons is that the code can be easily maintained.
However, when the business logic is constantly complicated, the method in calling the model in the Controller will become
PHP syntax has two assignment modes: Reference Assignment and non-Reference Assignment.
$ A = 1;
$ B = $ a; // non-reference value assignment
$ C = & $ B; // value assignment
$ A = 1;
$ B = $ a; // non-reference value assignment
$ C = & $ B;
Function Name usage format input/output operations
Array generation and conversion:
Array () generates an array (mixed [...]) value or, key => value: No
Array_combine () generates an array using the value of one array as the key name, and the
Use PHPExcel to read Excel 2007 or Excel files
Knowledge Point: www.2cto.com
Php reads excel files cyclically
Php encodes the characters in ascii format and converts the characters into decimal numbers.
Php reads the excel Date Format and converts
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