1. Array_shift () Moves the first cell of the array out of the data and returns it.Demo1:$tmparray =array ("1", "2", "3", "4");$tmparray =array_shift ($tmparray);Print_r ($tmparray);//array ("1");?>2.array_chunk () splits an array into multiple
The use of IIS as a Web server in Win7, but recently because of the project requirements, the server encountered a 404 error when the auto-turn (not in the client's jump, but the server received a client request to go to a directory to read the file
Install the LAMP environment in a Linux operating system.
Step1. install Apache
Enter the command in terminal
Copy codeThe Code is as follows: sudo apt-get install apache2
Open your browser and enter 127.0.0.1 in the address bar. If "It works!"
Is your php webpage garbled?
I,
When writing web pages, when designing Chinese content for storage, most of the problems may be garbled. If the code is garbled, we can check three aspects.
(1) Whether the webpage code is correct, for example,
PHP Study Notes 1-constants, functions, php Study Notes 1-constants
Constant: the const (php5) statement can only be assigned once. define is used for versions earlier than php5;
1
Function: contains a lot of functional code blocks;
Advantage:
Php session Database
It is very easy to save sesison to the database. It is used to perform CRUD operations on the Database Based on session_id. session_set_save_handler is used to customize the session execution method,
First create a data table
Common http header settings for php header functions, phpheader Function
// Okheader ('HTTP/1.1 200 OK '); // set a 404 header: header ('HTTP/1.1 404 Not Found '); // set the address to be Permanently redirected header ('HTTP/1.1 301 Moved
Function Methods used by php to obtain and check the class name, function name, and method name. php function name
1. function_exists ()-Return TRUE if the given function has been defined2. is_callable ()-check whether the parameter is a valid
PHP batch remove BOM header code sharing
This article mainly introduces PHP code sharing by removing BOM headers in batches. This article provides the implementation code directly. The code is simple and easy to understand. For more information, see
PHP multi-state code example
This article mainly introduces PHP multi-state code instances. This article uses two code instances to demonstrate the polymorphism in PHP. For more information, see
Polymorphism: Only one interface or base class is
Thinkphp Method for disabling caching
This article mainly introduces Thinkphp's method of disabling caching. During development projects, it is often difficult to use caching. Therefore, there is always a way to disable caching. For more
Example of Singleton writing in PHP
This article mainly introduces examples of Singleton class writing in PHP. This article provides code examples directly. For more information, see
Single Instance classes in PHP are performing data exchange, which
Trigger_error in PHP: trigger_errorphp
Example of a PHP error triggered by trigger_error in PHP
[Error blocker @]
In addition to setting error_reporting and display_errors, error_reporting (), and ini_set () functions in php. ini, you can also use
In PHP, the error log is saved in the System Log (Windows system) and the php log.
[Record errors to system logs]
In php. ini, set error_log:
Copy codeThe Code is as follows:Error_log = syslog
Or you can use the ini_set () function to set it during
Php uses the javashui API to read and display Word documents,
A small problem occurs in the project. How can php read Word documents and display their content as is?
You can use the API to view the write application API of mongohui.com.
Apply for an
Example of Codeigniter dom class usage
This example describes the usage of the Codeigniter dom class. Share it with you for your reference. The specific analysis is as follows:
Using simple_html_dom dom class as a class library modified by CI, you
Phpcms timed release SolutionUpdating phpcms articles is a complicated task. It would be nice if phpcms could update the articles on a regular basis. In this way, you can write all the articles at a time, and leave the rest of the release time to
Examples of Singleton writing in PHP and PHP writing examples
Single Instance classes in PHP are performing data exchange, which makes sense to save memory. Write a simple example.Class 1, single instance class itself:
class UTIL { private static
PHP exports Excel data to the database and database to Excel.
This example describes how to import Excel data into the database and export the database data to Excel in PHP. Share it with you for your reference. The specific implementation method is
Jquery returns multiple checkbox values and asynchronously submits them to php. jquerycheckbox
This example describes how jquery asynchronously submits multiple checkbox values to php. Share it with you for your reference. The specific
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