PHP write the program to send the Attachment (ii)
Class html_mime_mail{
var $headers;
var $body;
var $multipart;
var $mime;
var $html;
var $html _text;
var $html _images = Array ();
var $cids = array ();
var $do _html;
var $parts = array ();
/**
The acceleration of PHP application
One of the biggest advantages of PHP is its speed. In general, PHP always has enough speed to support the dynamic generation of Web content, and many times you can't even find a quicker way to do it. However, when
Shopping Cart Generation Code
/*Should be a netizen's request, it sent a shopping cart class code to carry out a simple analysis, I hope that the need for the novice have some help ~I am also a novice, analysis and interpretation of the same time is
Conversion between PHP binaries and strings
[Code]php Code:
Header ("content-type:text/html; Charset=utf-8 ");
/**
* Converts a string into binary
* @param type $str
* @return Type
*/
function Strtobin ($STR) {
1. List each character
$arr =
XAMPP PhpMyAdmin will have file size limitations, upload time-out and other issues, there is a workaround is to modify the configuration file, but I would like to recommend a different method--shell command, more rapid, direct and efficient import
A better way to do all of these things is to load the data into a database and then execute the query, such as the following query.
Listing 9. getfiles_good.php
Require_once ("db.php");
function Get_files ($name)
{
$rows = Array ();
$dsn = '
Build your own PHP framework-the base class for abstract controllers, framework controller
In the previous blog, we moved simple route parsing and execution from the portal file public/index.php into the framework. The entrance file suddenly
The Tempnam () function creates a temporary file with a unique file name. If successful, the function returns a new temporary file name. If it fails, it returns false.
The Tempnam () function creates a temporary file with a unique file name.
If
Chinese characters are judged by string encoding,/^[CHR (0XA1)-chr (0xff)]+$ This is the PHP validation regular expression that determines whether it is Chinese.
The Chinese characters are judged by the string encoding,/^[CHR (0XA1)-chr (0xff)]+$
PHP Tutorial customizing UTF8 and cp1251 functions
When you need to convert some data from UTF8, cp1251 (Windows-1251) or cp1251 to UTF8 you must use the iconv of the system functions. Common hosting providers do not allow this feature to be used.
*/
PHP gets the name or path of all the files in the folder including the subdirectory files.
/** New GetFile ($_dir[,$_emptydir,$_filetype]); * @parma $_dir is the directory name * @parma $_emptydir whether to get an empty folder, optional, default
1. Preface
Pagination display is a very common way to browse and display large amounts of data, which is one of the most frequently handled events in Web programming. For the veteran of Web programming, writing this code is just as natural as
Understanding and application of classes in PHP [i]
Many of the PHP enthusiasts in the learning process feel that the concept of PHP class is more difficult to understand and grasp, although know that the existence of the class has its existence,
This function is mainly to use the file modification time function Filemtime and the current time for subtraction to determine whether the content is updated.
$cahetime =2;//Setting the expiration time$cahefile = "Cahe.txt";//Read and write text
The output control function gives you the freedom to control the outputs of the data in your script. It is very useful, especially when you want to output a file header after the data has been output. The output control function does not affect the
Ask for security issues with three lines of code
$js = Explode (', ', $_get[' JS ');
foreach ($js as $file) {
Echo file_get_contents ('./public/js/'. $file. JS '). " n ";
}
Copy code attacker has no way to read PHP files on the server
[ ]
This option is available in the php.ini configuration file
Disable_functions =; This directive allows disable certain
; Functions for security reasons. It receives
; A comma separated list of function names.
; This directive was *not* affected by
To get the return array, simply set the , , or elements in the PHP script to look like this:
Note that in parentheses after the variable name, it is used to generate the array. You can also set different groups of array elements in the same
ckeditor+ckfinder+php upload file Configuration method, the new version of CKEditor only provides basic text editing function, the upload module is ckfinder by another component. Here the main record Ckfinder upload some parameter configuration, can
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