Oh, fun, I really want to do a function encyclopedia, just because my energy is limited, only write web development notes, one day an article update has been busy enough, because, my career is not only write this blog, there are many other sites
This payment class is based on official documentation changes! The main implementation of the generation of JS API, native package signature package and native response of the XML format data. Comments are marked with the intent of each method. Due
There are 4 code examples, what do you think they create objects and get the speed ordering of the member variables?
1: Set member variable to public, assign value to member variable by assignment operation, get variable directly
The
The so-called compilation is to replace the template with a positive to include the process of PHP code.It doesn't actually compile every request, so performance is acceptable.
Template files and PHP program files are compiled by the template
File permission settings
Rights Management
The main orders are: chmod, Chown, Chgrp, umask1. Change the permissions of a file or directorychmod2). Change the owner of a file or directoryChown3). Change the group to which the file or directory
Yesterday because the server is due to migrate the site to another server, the use of the LNMP architecture, the site after the completion of the relocation of various parts of the problem of the egg pain: A lot of Web page open prompt "No input
Problem:
A lamp server running on line, PHP does not support iconv functions.
Workaround:
Install LIBICONV, recompile Apache, enable PHP to support Iconv functions, implement UTF-8 and gb2312 encoded conversions.
Specific steps:
1, download
This example describes a simple way to implement a forced download of a file or picture in PHP. Share to everyone for your reference, specific as follows:
Download
function downregcaseaction () {
$file = "upload/regcase.jpg";
if (Isfile
One: Modify file upload language for PHPOpen Fckconfig.js
Found it:
var _filebrowserlanguage = ' asp '
var _quickuploadlanguage = ' asp '
Change into:
var _filebrowserlanguage = ' php '
var _quickuploadlanguage = ' php '
Second: Enable PHP file
Variable get,post,session cannot be passed between "1" pages in the latest version of PHP the automatic global variable is turned off, so to get the submitted variable from the previous page use $_get[' foo '],$_post[' foo '],$_session['. Foo '] to
The Authentication code is to prevent the machine from flooding to the website pollution and increase the server burden to appear. At present, large and small sites have verification code. Today, I implemented a simple authentication code class.
The PHP Custom function only allows returns a value with the return statement, and the entire function is terminated when it is executed. Sometimes when we ask a function to return more than one value, you can't output the value one after the other
Before we explain the concept of class, let's talk about the concept of object-oriented programming: Object-oriented Program Design (object-oriented programming, denoted for OOP) is designed to create software reuse code, with the ability to better
Brief introduction
There are three configuration items in php.ini:
Session.save_path= ""--set the storage path for the sessionSession.save_handler= ""--set user-defined storage functions, if you want to use the PHP built-in session storage
PHP provides 4 ways to execute system external commands: EXEC (), PassThru (), System (), Shell_exec ().Before beginning the introduction, check the PHP configuration file php.ini is prohibited this is a function. Locate the Disable_functions and
Echo getcwd (). "n"; // get the current working directoryEcho " ";Chdir ('08'); // change the working directoryEcho getcwd (). "n"; // Obtain the current working directory againThe getcwd () function returns the current directory.If yes, the current
If you see this Warning when executing the php program: "Warning: Cannot modify header information-headers already sent ...."Few notes based on the following user posts:There are several solutions:1. Blank lines (Blank line ):Make sure no blank line
During server configuration, you often need to configure permissions for the specified directory. For example, uploading a directory is an insecure Directory. We need to disable the permission to execute php scripts, nginx and apache prohibit 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service