Copy Code code as follows:
/**
* Remove HTML tags
*
* @access Public
* @param string str
* @return String
*
*/
function deletehtml ($STR) {
$str = Trim ($STR); Clear the spaces on either side of the string
$str = Strip_tags ($str, "");
The problem is often encountered in the collection of content typesetting problems, with some time to write a regular replacement of HTML tags and styles of functions, shared under.
Copy Code code as follows:
/**
* Formatted content
* @
For details, please refer to: micro-bo Data Cleaning (Java version)
This article is an introduction to the Python version, and only the Data Cleansing section does not contain operations on Excel, including removing HTML tags and removing URL
The name of the function
Interpretation
Introduced
Htmlspecialchars
Converts to HTML format with, single double quotes, greater than and less than
& Turn "Turn into "' Turn into & #039;> Turn >
Copy Code code as follows:
Get the current script URL
function Get_php_url ()
{
if (!empty ($_server["Request_uri"]))
{
$scriptName = $_server["Request_uri"];
$nowurl = $scriptName;
}
Else
{
$scriptName = $_server["Php_self"];
if
Guest Book section:
Class Members Guest book: Display message: class/notebook/index.php
?
Session_Start (); Start session
if (!session_is_registered ("Userregister") | | ($userregister = = "")) Check whether registration, such as Userregister or
Js| notes just started using JSP to do Web applications, like using php,asp as with JSP, in the HTML code mixed with a lot of scriptlet---that is, Java code Snippets. Because of my "typesetting" technology can also be, at the beginning feel very
The most recent site to do static generated content must be paged so on the Internet to find n many instances are not ideal, so took a little time to write their own method
No problem at the moment (20W HTML has been generated by method)
So post
This article brings the content is about PHP commonly used in the collection function summary (with code), there is a certain reference value, the need for friends can refer to, I hope to help you.
These days concerned about the PHP collection
There are many ways to launch an XSS attack on your Web site, and just using some of the built-in filter functions of PHP is not a good deal, even if you will Filter_var,mysql_real_escape_string,htmlentities,htmlspecialchars , strip_tags These
Replace.Let's take a look at one of the most useful commands for SED, replacing the command. You can use this command to replace a specific string or a matching rule expression with another string. The following is an example of the most basic usage
We in the HTML page production process, I believe that the CSS text hyperlink this concept is not unfamiliar. We all know that we want to add an anchor point to a piece of text or to a specified element-that is, hyperlinks need to use a tag in HTML.
Usage:
test1 test2
In JS, you can use:
Test. innerHTML:
That is, all content from the starting position of the object to the ending position, including Html tags.
In the preceding example, the value of test. innerHTML is " test1 test2 ".
Test.
50 jquery Code Snippets (RPM)This article will show you 50 jquery code snippets that will help you with your JavaScript project. Some of these snippets are only supported from jQuery1.4.2, others are really useful functions or methods that can help
Typographical layout is also a kind of physical activity. Resources are organized from the network and sent to those children's shoes that haven't been sent to Tibet. If you have already collected the resources, please do not throw bricks. 1. How to
JavaScript already has many powerful built-in methods, but sometimes you don't need a function in the built-in method, how can we elegantly expand The JavaScript function? In The morning, I saw The article Extending JavaScript-The Right Way, the
Work units and transactions of the Abp, and work unit transactions of the abp
Environment: Abp1.2
Question: the timing of transaction commit caused by the failure to call the workunit's SaveChanges method.
For example, an Application Service Code
Example code:test1 test2Href= "Javascript:alert (test.innerhtml)" >innerhtml content Href= "Javascript:alert (test.innertext)" >inerhtml content Common denominator: innerHTML and innertext will replace the contents of the element.Different
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
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.