Chapter 1/3 Lamp Overview and use of PHP
1. Abbreviation: lamp= (linux+apache+mysql+php) (i.e. os+webaapp+db+ background script)
2. Q: How does lamp work?
Answer: Domain name
Dns->
Ip:80->
(Linux, Unix (Hp-ux,solaris OpenBSD), Microsoft Windows
PHP Add a rectangle to the picture and add a watermark
0x80) $i + +; $length + +; } return $length; }//To add watermark picture $imagefile = "3.jpg"; Text to be added $str = "Photo uploaded by Gordo". Date ("Y years m D Day h I min s second");
PHP implementation File Download
have been writing Java programs, recently according to project needs, learning a bit of PHP programming, just started to learn a little bit, and now here to the novice to share my experience in writing a file
The PHP function does not get the directory part and the file name part of the Chinese path.
Problem: The following two functions are available in PHP to get the directory part of a path
Dirname― returns the directory portion of the path
PHP References &
PHP refers to the meaning of &
?
Such as:
function &test (){Static $b =0;//declaration of a statically variable$b = $b +1;Echo $b;return $b;}? $a =&test ();? & Represents a reference function this way, the $b and $ A returned
Ubuntu PHP5.3 after installing xdebug var_dump output No formatting problem
?
Ubuntu PHP5.3 after installing xdebug var_dump output No formatting problem
?
Configure the Apache2.2 + PHP5.3 development environment under ubuntu10.04 and install a
PHP judgment string is pure English, pure Chinese or Chinese-English mixed
PHP determines whether a string is a Chinese (or English) method, except that the regular expression determines and splits the character to determine whether the value of
PHP Basic Learning--the use of Var_dump functions
Var_dump
(PHP 3>= 3.0.5, PHP 4)Var_dump?--? information about printing variables
Describevoid?
Var_dump? (mixed expression [, mixed expression [, ...]])
This function displays structure
PHP File Upload Configuration
apache+php environment upload large files related configuration options
Avoid secondary searches and do no work.
First, you need to configure the following parameters in php.ini based on the maximum file size value
"Go" PHP engineers face a growing bottleneck
As one of the most widely used languages in web development, PHP has a large number of fans, so are you a good programmer? Do you want to face all kinds of problems while doing self-cultivation, how can
Application of & in PHP
Example:
?
$a = 1; $b = & $a; $b = 2;echo $b; 2echo $a; 2
? 1
Represents a reference that is passed to a function. If you really want to pass it by reference. You need function A (& $obj) {} to accept. However, it is
PHP scales images by maximum size
$maxWidth = 180;//Maximum width $maxHeight =; Maximum height $iSuofang = $arrPicwh [' W ']/$arrPicwh [' h '];//original ratio $iSuo = $ARRPICWH [' h ']/$arrPicwh [' W ']; if
My phpmyadmin works fine, but why do I use Mysql_connent () to Prompt for errors?
I've configured PHP and MySQL to access and modify the database from within the phpMyAdmin, but somehow I access it from my own function, always prompting "undefined
The Phpxref:php Code reading tool
????????????????? In the face of large open source programs, if we want to modify, two times development, or simply read the code. That's very difficult.? very well, Phpxref is a pretty good tool that allows you
PHP Read File
1. PHP file when the $testfilename2 incredibly is not to single quotation marks, or double quotation marks will be error, and later with the variable should be more single quotation marks
?
?
$testfilename 2= '
PHP save remote picture to Local
To display a remote picture:
?
?
?
First type: precise
?
': ' false ';?
The second type: Extract pictures from the article and save to Local
?
function Getimg ($str) {$str = Stripslashes ($str); $pattern = "
PHP Forms and user input
http://taobeibei.iteye.com/blog/615431
PHP's $_get and $_post are used to retrieve the values in the form, such as user input.
PHP form Processing
Form instances:
The above HTML page instance contains two input
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