PHP Tutorials-learn p HP's
If you want to understand the basics of PHP, then you've come to the right place. The goal of this tutorial is to teach you the basics of PHP so that you can:
From PHP scripts you download to make them better fit
Nginx Hide Version Number:
1, enter the Nginx configuration file directory (this directory according to the installation decision), with the nano edit open
Nano nginx.conf
Add Server_tokens off in HTTP {-}; Such as:
HTTP {...... OmittedSendfile
PHP Installation Configuration Method One
1. Get installation files: http://www.php.net/downloads.php php-5.3.8.tar.gz
To obtain the support files needed to install PHP: http://download.111cn.net/download/netlong339/1351852 libxml2-2.6.32.tar.gz
2
Arithmetic operators1. Arithmetic operators: +,-, *,/, and %.2. Increment/decrease operators: for example, $ a ++, $ a --, ++ $ a, -- $.For example: The code is as follows:Copy code $ A = 10;$ B = 5;$ C = $ a ++; // assign values first and then
The header function is most commonly used for sending http classes instead of downloading.JumpIt will execute the last one, but it is conditional, for example: The code is as follows:Copy code Header ('Location: http://www.111cn.net ");Header
For example, there is a string: $ a = 'Hello world hello pig hello cat hello dog hello small boys ';Then we want to change the 3rd hello appearance to good-bye, for example:'Hello world hello pig good-bye cat hello dog hello small boys ';In this
Format the time and/or date by region. The setting of the current language environment for the month and the day of the week and other language-related strings is as follows: setlocale ().Not all conversion specifiers support your C library. In this
Because Javascript (usually) client technology and PHP (usually) server technology are used, since HTTP is a "stateless" protocol, variables cannot be directly shared between the two languages.However, people may use the relationship between
The code is as follows:Copy code ultra-simple php file upload program // File Upload The code is as follows:Copy code If ($ _ files){Upfiles ($ _ files ,'./');}Function upfiles ($ files, $ path ){Global $ nowtimestamp;$ Exname =
Recently, when an input box loses focus, the function automatically saves data. Of course, when the jQuery selector selects input and blur, ajax submits data to the PHP file and the PHP file saves the data. It is important to pay attention to
Extract keywords from webpagesExtract and display keywords from the specified page. The code is as follows:Copy code $ Meta = get_meta_tags ('http: // www.111cn.net /');$ Keywords = $ meta ['keyword'];// Segmentation keyword$ Keywords = explode (
Open commands. php in the editor/filemanager/connectors/php directory and find the FileUpload function. The code is as follows:Copy code $ SExtension = substr ($ sFileName, (strrpos ($ sFileName, '.') + 1 ));$ SExtension = strtolower ($
Now there is A need: string A and string B, string B contains string A, use string A to replace string B with another string or delete it.Using PHP functions, str_ireplace () and str_replace () can be used.1. The str_ireplace (find, replace, string,
PHP cookie usage The code is as follows:Copy code Setcookie ('mycooker', 'value ');// Function prototype: int setcookie (string name, string value, int expire, string path, string domain, int secure)Echo ($ mycookie );Echo ($ HTTP_COOKIE_VARS
First, we need to know that the installation of curl_init in php is not usable, and we must open an account before it can be used.In php. ini in C/windows, I enabled the extension = php_curl.dll function, and then restarted apapche.Check whether
Variables are clearly different from other variables. Next I will introduce you to static variables and attribute methods, reference static variables, and usage of static functions. For more information, see.Static variablesAnother important feature
1. Get the addressThe main function of this function is to use a regular expression to match the image address in the page source code. The regular expression used here is: The code is as follows:Copy code //iU The homepage obtains the html
Symptom: zend studio xdebug 57% waiting for xdebug sessionThe development environment of the author is usually a windows host machine + vmare Linux virtual machine. The linux samba function shares the directories under the virtual machine to windows
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