First, the program code
Submit page processing // when the plan is used as part of an SQL command: if the field involved in the control is numericProgram code if (! Empty ($ _ post ['checkbox']) {
$ Expr = join (",", $ _ post ['checkbox']);
$
Keyword: Apache 403 Forbidden
System Configuration:
Operating System: Red Hat Linux 6.2
Web server: Apache 3.1.1 + Jakarta-Tomcat 3.1.1
Database Server: Oracle 8i
Apache server is currently the most widely used Web server. According to
Php json extension comes with the json_encode function. If you encode Chinese characters, it is automatically converted to unicode encoding.
$ A = array ('city' => "Beijing \" '\ ABCD Tianjin ");Echo json_encode ($ A). "\ n
It is necessary to make PHP pages static, especially in the CMS system. After some content is generated, it will basically not change. In this case, if HTML is used to make the pages static, it will undoubtedly reduce the burden on the service to
ArticleDirectory
Example-HTML form
Example:
Ajax request
In the following Ajax example, we will demonstrate how a webpage communicates with an online web server when a user inputs data into a web form. Enter the name in the text box
PHP memcache
// Connection$ Mem = new memcache;$ Mem-> connect ("192.168.0.200", 12000 );
// Save data$ Mem-> set ('key1', 'this is first value', 0, 60 );$ Val = $ mem-> get ('key1 ');Echo "Get key1 value:". $ Val. " ";
// Replace Data$ Mem->
I. Directory operationsFirst, we will introduce a function that reads data from a directory, such as opendir (), readdir (), and closedir (). When using this function, we will first open the file handle and then list it through iteration:
$
The first time I did this, I imitated what I typed.
View code
# Include # Include String . H> # Define Maxn 1000000 Struct Que { Int X, Val;Que ( Int XX, Int YY): X (XX), Val (yy ){}Que (){};} Q [maxn]; Int Main (){ Int T; Char Name [ 6 ], Na
Phpexcel is very convenient to operate on Excel, especially when images can be conveniently added. jpg and PNG formats are supported.
: Http://www.codeplex.com/PHPExcel
The following are the usage methods
Include 'phpexcel. php ';
Include
For more information about smarty, see: http://www.php100.com/manual/smarty/index.html
Index. php
Require ('.. /libs/smarty. class. PHP '); $ smarty = new smarty; // Add a custom regulator $ smarty-> registerplugin ("modifier", "E",
PHP Function Map ( $ Fun , $ List , $ Params = Array ()){ $ ACC = Null ; $ Last = Array_push ( $ Params , Null ,$ ACC )-1 ; Foreach ( $ List As $ Params [ $ Last -1]) { // The first time I saw this writing style, it was amazing. $
I. First, PHP webpage code
1. The php file encoding should match the webpage encoding.
A. if you want to use gb2312 encoding, PHP needs to output the header: Header ("Content-Type: text/html; charset = gb2312 "), add to the static page. All
Sudo Apt-Get Install Apache2 Sudo Apt-Get Install PhP5 Sudo Apt-Get Install Libapache2-mod- PhP5 Sudo Apt-Get Install PhP5- Curl # Install the curl library for CD Communication /Etc/ Apache2 Sudo VI ports. conf # Add the following two
1. General hardware upgrade rules: For PHP scripts, the main bottleneck is CPU, and for static pages, the bottleneck is memory and network. The Static Page downloaded by a 400 MHz ordinary Pentium machine can make the T3 leased line (45 Mbps)
What hostrator.com is all about?
Free 10000 MB (10 Gb) disk spaceFree 50000 MB (50 GB) bandwidthFree subdomain (yourdomain.hostrator.com)Free full ftp accessFree Web file managerFree 24/7 Technical SupportFree PHP and MySQL supportFree your own
Defining a class in PHP extensions is very easy. See the address:
Https://github.com/walu/phpbook/blob/master/10.1.md
Struct definition of the class:Struct _ zend_class_entry {
Char type;
Char * name;
Zend_uint name_length;
Struct _
$ _ SERVER ['php _ SELF '] function usage # File Name of the script being executed, which is related to document root.
$ _ SERVER ['argv'] function usage # parameters passed to the script.
$ _ SERVER ['argc '] function usage # contains the number
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