PHP operations file and directory related functions

Judge file type filetype (' a.php '); Open or create a file fopen (' a.php ', ' W '); Read the file fgets (' a.php ');//Read the fread (' a.php ', 1049) by rows;//read by block file_get_contents (' a.php '); Copy file copy (' a.php ', './b.php ');

How PHP uses Curl to transfer file streams

Public function Postfile () { ' filename '; './resource/temp_pdf/'; '. pdf '; (Is_file ($path. $name. $ext) && filesize ($path. $name. $ext)!= 0) { "http://test.api.com/index.php"; Array ( "Bar", //@

PHP does not complain, configure php.ini

If you have finished installing PHP, you will find no error when browsing the Web page. Then you have to modify php.ini to change display_errors = off to display_errors = On If finished, find the newspaper: Notice:use of undefined constant ....

Allow Windows version of PHP to support Chinese path access ____php

Let the browser access the PHP file through the Chinese path, as shown below Need to set URL rewrite, and use Iconv function in index.php file Iconv ("Utf-8", "GBK", $_get["url"]); The directory structure is as follows In the. htaccess file

PHP is matching Chinese characters!

chr

PHP is matching Chinese characters! /^[\x{4e00}-\x{9fa5}]+$/uThe above regular expression is a regular expression that puzzles many PHP programmers to match Chinese characters.You may find it very simple, in fact, different coding, different

PHP Curl POST request lost ' + ' problem

Background: Use and friends do not login authorization of the jump, found that licensing occasionally failed, after the log view, plus the password with the ' + ' character will authorize failure. By grasping the bag found that PHP uses Curl to

Two-dimensional PHP array to be re-merged to add the same amount

$arr = Array ( ' user_id ' =>, ' goods_id ' =>, ' number ' => 1, ), Array ( ' user_id ' => 102, ' goods_id ' =>, ' number ' => 1, ), Array ( ' user_id ' => 102, ' goods_id ' =>,

PHP uses session to prevent forms from being repeatedly submitted ____php

When testing the function of the program, found that the form post data there is a duplicate submission of the problem, and in each submission page with the verification code to verify the user experience is not very good, access to the online data

Object-oriented development public number, PHP code encapsulation class, function ____ function

Students often give me a message "Many teachers use object-oriented development, code is very tall, why don't you do that?" In fact, son Heng Teacher's course not only let you know it, And let you know the reason why. If the child Heng

thinkphp relative path problem and the method of using PHP native file operation

I did a test today and wrote File_put_contents (' Log.txt ', "log info ') in any controller \ model\ common/function.php in the thinkphp project. The last generated log.txt is actually in the project root directory. No wonder the thinkphp Address

PHP read Excel Chinese garbled excel_class ...

Today encountered a big problem, is reading excel in Chinese garbled big problem. excel_class.php is a PHP import Excel tool, it can easily import data from Excel to PHP, but also easy to use PHP to import data into Excel. But today is not very

PHP Operation Excel–phpexcel Basic usage detailed ____php

1.header[PHP] View plain copy header ("Content-type:application/vnd.ms-excel");   Header ("Content-disposition:attachment;filename=sample.xls");   Header ("Pragma:no-cache"); Header ("expires:0"); 2.PHPExcel

PHP Bottom Depth Exploration (4)---Analysis of the operation stage of Apache

Just today yesterday morning when the teacher said a little bit, as to expand and improve it. 2. Operation Stage 2.1 Running Phase Overview In the runtime, Apache's main job is to handle the user's service requests. At this stage, Apache abandons

How PHP wraps ____php

Mac and \ n can all Why would you say that? This is related to how PHP files are executed PHP files are executed in two ways, one through a Web page and one through a command prompt ① through web page execution You can see that these two

PHP standard Library (SPL)-iterator-appenditerator and Arrayiterator detailed

Prototype: Appenditerator extends Iteratoriterator implements Outeriterator { * * method /public __construct (void) Publi c void Append (iterator $iterator) public mixed current (void) public void Getarrayiterator (void) Publi C iterator

PHP Team Coding Specification & Code Style style specification

first, the Basic Agreement 1. Source Files (1), the pure PHP code source file only uses the ; (2), the source file PHP code format must be no BOM UTF-8 format; (3), using the Unix LF (newline character) as the line terminator; (4), a source file

Correlation analysis of Php:similar_text () function

When we want to compare the similarity of some sentences or content or the degree of match, we will inevitably use the Similar_text () function, the following is a code demo I created 6 sentences and used symbols and then 22 comparisons, which shows

Several common ways to prevent form recurrence in PHP ____php

1. Use JS to have the button disabled after one click (disable). This method can prevent the occurrence of multiple clicks, and the implementation is simpler. The disadvantage is that if the client prohibits JavaScript scripting, it fails. 2.

The difference between http_host and server_name in $_server in PHP ____php

Reproduced from: Eclothy http://blog.csdn.net/eclothy/article/details/43303759 Recently in the development of station software, using the access to the domain name to determine the relative problems of subwebs. PHP gets the current domain name there

Total Pages: 12780 1 .... 10402 10403 10404 10405 10406 .... 12780 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.