1) PHP supports basic data types as shown below:An integer (integer), float (floating-point), String (String), Boolean (Boolean), Array (array), object, and two special types: null (empty), resource (Resource).Note: A variable that is not assigned,
PHP pre-defined variables (2)4. Session variable ($ _ SESSION): the data generated by the php session function is stored in the $ _ SESSION variable in the form of a super global variable.1. Session IntroductionSESSION is also called a SESSION
Today, we will refer to php official introduction to php global variables to understand some usage of php global variables and some thoughts on it. Now we hope to help you.
I. Key points:
1. What global variables are expired and how to deal with
keyword global:used to make a function call an external variable, but it is not to make the variable super-global. Instead of 1, a local variable is defined inside the function and the name of the local variable is exactly the same as the name of a
1.1 Submitting data through form form formsIndex.htmlThe form jumps to the test.php page, and the form data is passed through the post.test.php$username =$_post[' username '];echo $username;?>$_post is a super global variable that is passed to the
1. Keep configurations in a centralized manner. As a general principle, we recommend that you store most of the information in one location (possibly in a file) so that when you need to modify the information, all necessary modifications can be made
HTML form preface: HTMLHTML (HTMLtag ). To some extent, Html document img, html link a, html title h, and so on. The specific image size and title Font are provided in the form of attributes. HTML form (used to collect different types of user input)
1) PHP supports the following basic data types as seen below:An integer (integer), float (floating-point), String (String), Boolean (Boolean), Array (array), object, and two special types: null (empty), resource (Resource).Note: A variable that is
1. Keep the configuration centrally placed.As a general guideline, it is recommended to keep most of the information in one location (possibly a file) so that all necessary modifications can be made in the same location when the information needs to
Problem1. How do I access session variables (sessions)?A by $_getB by $_postC by $_requestD Through global variablesE. None of these are right.2. Which function will let the server output the following header?Set-cookie:foo=bar;Answer: ______________
PHP5 Data typesString (String), Integer (integer), float (floating-point), Boolean (Boolean), Array (array), Object (objects), null (null value).stringYou can put any text in single and double quotation marks:"; $x = ' Hello world! '; Single quotes
PHP session usage and security issues and session considerations, session using the expiration time set to 0 of the cookie, and a unique identifier called the session ID (a long string of strings), The server-side synchronization generates some
Previously, we created a form under an HTML page in the HTML form learning article.This form is used by users to enter dataThe specific code is as followsDOCTYPE HTML>HTML>Head>MetaCharSet= "Utf-8">Head>Body>H1>User LoginH1>formname= "Input"Action= "
Brief introductionEven if you are developing a new, large PHP program, you will inevitably have to use global data, because some data needs to be used in different parts of your code. Some common global data include: Program settings class, database
close contact with PHP variables, constant learning notes (read notes from PHP manual)
A dollar sign ($) in PHP follows a variable name, representing a variable. The name of the variable is case sensitive. where the variable name
allow numbers or
Study Summary:
* Understand the use of basic array functions
* Understand the traversal of arrays
* Understanding the basic relationships and use of hyper-global arrays
Array1. Array definition and traversal
2. Array function
Array
The main theme is
. variable extension System in PHP string
. More data types available in PHP
. Conversions between types
. Enter and use variables and constants
. How to build an expression in PHP and the operators needed to build an expression
.
PHP can be said to be a very fire in the back-end language, it is small and small, and HTML and other front-end language can be said to be seamless, coupled with the advent of xampp,wampp and other tools, but also the front-end developers of the
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.