PHP Learning Note 01,php Learning Note 01
Example:
Why do you want to learn PHP
Subjective reasons:
Some time ago in the school to deal with the graduation of some things, back to Shanghai began to find a job journey. Intentional work is
Strip_tags removes HTML and PHP tags. Syntax: stringstrip_tags (stringstr); return value: string type: data processing content description this function can remove any HTML and PHP Mark strings contained in the string. If the HTML and PHP labels of
1. Mysql_real_escape_string ()This function is useful for preventing SQL injection attacks in PHP, with special characters, such as single quotes and double quotes, plus a "backslash" to ensure that the user's input is safe before it is queried. But
String functions1.explode ($delimiter, $str [, $limit]) splits the $STR string $str with the $delimiter delimiter, returning a segmented array$delimiter: Delimiter$STR: the string to splitThe number of elements that return an array after splitting
Objective
The PHP script can be placed anywhere in the document. This article mainly includes the following content:
PHP tags
Detach from HTML
Instruction delimiter
Comments
PHP tags
PHP script to
end with:
Mobileurl function in include/global.func.php 858 lineA total of four parameters, moduleid-model id,catid-Classification Id,itemid-Article id,page-pagefunctionMobileurl ($moduleid,$catid= 0,$itemid= 0,$page= 1) {if(Re_write)return $moduleid.‘
strip_tags-Remove HTML and PHP tags from a string, very important functions(PHP 4, PHP 5, PHP 7)string Strip_tags (String $str [, String $allowable _tags])$str: Enter a string. $allowable _tags: Optional, specifies a list of characters that are not
Now the development of the site to use the Smarty framework template, feel very good, better realize the PHP source code and the separation of HTML. Now share some common variables of smarty.
1, smarty_dir SMARTY directory
Locate the full system
Strip_tagsGet rid of HTML and PHP tags.
Syntax: string strip_tags (String str);
return value: String
Types of functions: Data processing
Content Description
This function can remove any HTML and PHP tag strings contained in the string. If the HTML
Programming languages. PHP php:hypertext preprocessor hypertext Preprocessor early PHP Personal homepage Personal web page. A tool that can be clipped in HTML code to get database resources. In order to create dynamic Web site. See Data Source:
Method One
The code is as follows
Copy Code
echo strip_tags ("Hello world!");
Strip_tags---To remove html and PHP tags from strings
Syntax: string strip_tags (String str [, String allowable_tags])
Description
templates | terminator
"There was a precious template in front of me, I did not cherish, until the others are used, I regret!"If God can give me another chance, I will say three words to this template--I use you. If you want to know how long I use,
First function: Strip_tags, remove HTML and PHP tagsNote: This function removes any HTML and PHP tag strings that are contained in the string. If the string of HTML and PHP tags are wrong, for example, less than the symbol, it will also return
This article introduces various methods and implementation programs for removing unnecessary HTML, Javascrit, and Css labels from PHP.
1. Do not retain any HTML tags. The Code will be like this: echo strip_tags ($ str );
2. if you keep only one tag,
function
Description
Addcslashes ()
Returns a string that adds a backslash before the specified character.
Addslashes ()
Returns a string that adds a backslash before a predefined character.
PHP string functions* Directory [1] features [2] Output [3] space [4] case sensitive [5] HTML [6] format [7] compared to the previous
String processing and analysis are an important foundation in any programming language and are often simple and
Let's start by understanding several file manipulation functions:
The fwrite () function writes to the file (which is safe for binary files).
Fwrite () writes the contents of the string to the file pointer. If length is specified, the write
installation based on the libmemcached,php extension memcached Zhang Ying Posted in .- -- -Category: Php Tags: libmemcached, memcached, PHP, installation One, why install memcached extension memcached 1.2. 4 and above increase the CAS (Check and Set)
Read the collection of PHP and MySQL Web development notes: http://my.oschina.net/bluefly/blog/478580 1.Benefits of code reuseCost, reliability, consistency note: Reusing code can save a lot of effort as long as the original code is modular and well
Security is a very important aspect of programming. In any programming language, a number of functions or modules are provided to ensure the security of the program. In modern web site applications, it is often to get input from users around 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.