/***
* Time 2010-8-9
* www.ite5e.com
* Note: If you have any questions, you can reply.
* Test code is called at the bottom of the program.
***/
Define ("Default_font_path", "C:/windows/fonts/simhei.ttf");
Class barbarism
{
Private $_x;
Many friends in the early years of learning PHP, connect to the database read or write always garbled, today small series here to tell you a simple way to solve the garbled problem
Add MySQL database with phpMyAdmin, and then use PHP to manipulate
Code Instance:
PHP File Statistics Code
$countfile = "Num.txt";
The definition counter writes the file to the current directory under Count.txt, and then we should test whether the file can be opened
if ($fp = fopen ($countfile, "R")) = =
Developers often use single quotes and double quotes, and in the selection of that is not very clear, the following is the "single quotation mark and double quotation mark difference."
The fields inside the double quotation mark are interpreted by
There are several ways to invalidate the cache in some areas (only for the desired cache):
First,Inser:
Defines a handler function to be used for a inser tag, with the format of the function name: insert_xx (array $params, Object & $smarty) where
curl_setopt-setting an option for a curl callDescribeBOOL curl_setopt (int ch, string option, mixed value)The curl_setopt () function sets options for a curl session. The option parameter is the setting that you want, and value is the one given by
The function compares full download HTTP resource class, at the same time can obtain the information of HTTP header.
Class Dedehttpdown
{
Public $m _url = "";
Public $m _urlpath = "";
Public $m _scheme = "http";
Public $m _host = "";
Sounds a little dizzy, doesn't it?!! Use PHP to manipulate PHP pages. There is a small use, in a system may have individual small items inconvenience to the database, but we have to often call in other pages, but also need to update, then we can use
On some hosts, you may not have permission to modify the system's default installation pear, but you want to install your own pear package. In this case there is also an easy way to achieve:First create a copy of the pear configuration file under
The following error occurred while Setcookie.Cannot modify header information-headers already sent by ....This error is very common, and if you output any textual content before Setcookie, you will get the above error. Because the page header
Parse_ini_file used to parse a configuration fileConfiguration filesuch as Config.ini[Host]hostname = localhostdbname = DatebaseUsername = rootPassword = root[Smatyconf]Smarty_templates_dir=templates_dirSmarty_config_dir =config_dirArray
Two previous articles, custom session (ii)-database save and why don't I use the sessionBut then we found that there were problems. The former treatment is practically useless in practice, and the session recycling has to be handled separately. The
Header (Content-type:text/html;charset=utf-8);
if (!function_exists (file_get_contents)) {//If the system does not have a file_get_contents () function
function file_get_contents ($file) {//write your own file_get_contents () functions
$fp =
Plugin too much is always bad, the spirit can not be used without the principle of online search, this method is feasible.
1. Open the wp-includes. functions.php file below to insert this code:
Page-free plug-in self-added
function Par_pagenavi
function mkdir has two parameters, directory path and access rights
Example MkDir (/tmp/test,0777)
Then want to get the permission code, not necessarily is set above, the current system umask will be with the set value ' and ', this is the real
Depending on the situation, the average developer is often less efficient than a good developer 10%~20%. Good developers are more efficient because they have a lot of experience and good programming habits. Bad programming habits can affect
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