Domain Name: http://localhost/down.php?add=down/0522/img.png (domain name is random)
$img = $add
Echo $img;
?>
===================================================================
$img take only the name of the picture (Img.png)
i.e. Delete
By judging the string and intercepting the string and then splicing it together, the text image will automatically wrap the line. the following code is used to paste the text into a png image when you accidentally browse the web page, as a matter of
In the last two sections, I spoke about guest. php and edit. php. note the differences between php and html: php is usually -- & gt; (1) & lt ;? Echo (zihanonline );? & Gt; & nbsp; (2 )&
In the last two sections, I spoke about guest. php and edit.
In this section we will put dele.php and sys.php up.
---------
dele.php
Delete message
Require ("sys.php");
if ($Submit)
{
if ($passWord <> $managepwd)
{$errorm = "bad password. No permission to operate:";}
Else
{
$content
Instance code:
Copy codeThe Code is as follows: /**
**************************************** *******************
* Read Me
* Article pagination
*
* Paging mode: Paging by words, line feed, and special mark
* In fact, the implementation idea is the
A simple text operation class
I wrote it before, but I never got a chance to use it. The text is not as good as the database.
Data is saved in rows and ended with \ n. Note that the data you input must end with "\ n", which is the most basic class
Copy codeThe Code is as follows: Class CtbClass {
Var $ file;Var $ index;
// Create a file and write it into the input.Function null_write ($ new){$ F = fopen ($ this-> file, "w ");Flock ($ f, LOCK_EX );Fputs ($ f, $ new );Fclose ($ f );}// Add
Searchstr = ("/". preg_quote ($ searchstr ). "/"); // $ searchstr is the search keyword $ records = file ($ file ); // obtain the number of all records // $ file is the data file to be searched for $ search_reocrds = preg_grep ($ searchstr, $
Set broken the keywords in the information content, that is, search for a keyword, the font color of the keyword is red
/** * Keyword Set Broken method * * @access public * @param array $options parameter arrays *$info _arr Array Contents*$search _
Copy Code code as follows:
Class Ctbclass {
var $file;
var $index;
Create a file and write input
function Null_write ($new)
{
$f =fopen ($this->file, "w");
Flock ($f, LOCK_EX);
Fputs ($f, $new);
Fclose ($f);
}
Add data log to
Sometimes upload images need to add a watermark to the site, watermark can be divided into text watermark and image watermark, the following implementation of these two kinds of watermark text watermark is to add text on the picture, mainly using
Instance code:
Copy Code code as follows:
/**
* **********************************************************
* Read Me
* Paper pagination
*
* Paging way, can be divided by the number of pages, according to the line break page,
Text watermark
Text watermark is to add text on the picture, mainly using the Imagefttext method of GD library, and need font file. The effect chart is as follows:
The implementation code is as follows:
Copy Code code as follows:
$dst
When using Parsedown to parse the Markdown, some problems of XSS filtering were encountered.
It is found that Parsedown will 代码 escape HTML code in the area, 代码 but not outside the area, as shown in the following code
PHP
text($test);/** *
This article collects 10 articles about PHP fputs () functions recommended for everyone to watch
1. ThinkPad Tablet 2 PHP stealth a word back door, and thinkphp framework plus password program Base64_decode
Brief: ThinkPad Tablet 2:thinkpad tablet 2
Under ubuntu12.04 phpunit error PHP Fatal error:call to undefined method php_codecoverage_filter::getinstance () in/usr/share/p hp/phpunit/framework.php on line 46[php] View Plaincopyprint? [Plain] $ pear config-show which showed this (unlike my
This is the problem with the php text message interface. I found a ordering system on the internet and wanted to use it for my own use. However, I cannot use the text message function above. I asked the official customer service staff, he said that
This article mainly introduced the PHP text to the picture function principle and the realization method, combined with the concrete instance form analysis PHP based on the GD2 expansion library to generate the picture the related configuration and
PHP intercept Chinese string does not appear the solution of the number [original] big | Medium |small [Do not specify --8- the -:Wuyi|By Zhang Banquet] [Article Zhang Feast this article version: v1.0Last modified:2007.08. theReprint please specify
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.