Role of DIRECTORY_SEPARATOR

DIRECTORY_SEPARATOR is an internal constant of php. It is used to display system separator commands and can be directly used without any definition or inclusion. In windows, the path separator is (of course, it can also run normally On some systems).

Summary of 13 coding habits required by PHP programmers

I am a beginner in PHP and have only six months of PHP programming experience. I completed my work under the guidance of a certified zend engineer. Whenever I write a script, I will pay attention to some details that can help me do better, that is,

Session mechanism in php

    1. session Generation Mechanism in php   Let's analyze how a session is generated in PHP. The purpose of the session design is to maintain the various statuses of each user to make up for the shortcomings of the HTTP protocol (stateless ). We

API permission design summary

Encryption mode md5 (POST parameter (in ascending order, except the key sign parameter) + User key) PHP encryption algorithm code: [php] foreach ($ p as $ v) {$ temp = explode ("=", $ v); $ pArr [$ temp [0] = $ temp [1];} ksort ($ pArr ); foreach ($

PHP sends email activation Verification

Step 1: connect to the database using php: dbconnection. php Step 2: email. class. php debug = FALSE; $ this-> smtp_port = $ smtp_port; $ this-> relay_host = $ relay_host; $ this-> time_out = 30; // is used in fsockopen () # $ this-> auth = $ auth;

Php web page capture news code

(. *) /"; $ ptr ="/ (. *) /"; preg_match_all ($ ptr, $ line, $ str, PREG_SET_ORDER); if ($ str) {$ res [$ c] = strip_tags ($ str [0] [2]); // $ res [$ c] [1] = $ url. "admin/view_n.php? Id = ". $ str [0] [1]; $ c = $ c + 1;} print_r ($ res [$ c]);}

PHP cross-compilation and porting

Configuration and Compilation: This is the simplest version and disable all extension modules; [Plain]. /Configure -- prefix =/home/pub/johnny/network/install-php -- host = mips-linux-gnu -- datadir =/home/pub/johnny/network/install-php /data --

[Happy to learn php100 days] Day 3: unlimited PHP File Operations

This motto: when no database exists in the past, reading and writing files is one of the only tasks that our programmers can do on an empty night (maybe not necessarily ~~~). Therefore, even if this technology is so simple, fast, and common, we

Implementation of ThinkPHP Paging

The paging class needs to be combined with the query. We can use the limit method or page method that comes with ThinkPHP, the purpose is to obtain the data on the current page (you can also obtain the complete data first and then display the data

Where is the php. ini file?

Assume that the php version is 5.2.x. If it is a lampenvironment, PHP source file php-5.2.x.tar.gz after decompression there will be a php-5.2.x folder.In the php-5.2.x folder./configure -- prefix =/opt/php5.2, make, make intall,The php5.2 folder

Php practice 13th days

Today, I re-implemented Object-Oriented Programming and learned the magic of _ construct, a parameter of an instantiated object, and the magic method executed before the destruction of an object.And_ Get: the first parameter for obtaining private

Php practice 17th days

Today I learned a very amazing css layout method. Position: absolute;Top: 61px;Bottom: 0px; After the position is set to absolute, top is the top side, left is the left side. So if you change the bottom side to 0, will it become window self-adaptive?

$ SESSION loss after PHP upgrade

Upgrade PHP from 5.3 to 5.4.16 for an internal system in the production environment Login is not allowed after generation. When two pages on the server are redirected, $ SESSION is not obtained. Sadly, I tried to find a solution on the Internet and

Call TAG on the DEDE list page

The [field: id function = GetTags (@ me)/] tag can be called.Except that the connection is not included. If you need to connect, please comment on line 130 of the include \ helpers \ archive. helper. php file.  // $ Tags. = ($ tags = ''? $ Row

Export and write Excel files using PHP

load ($ filePath); // $ filename can be an uploaded file, or the specified file $ sheet = $ objPHPExcel-> getSheet (0); $ highestRow = $ sheet-> getHighestRow (); // get the total number of rows $ highestColumn = $ Sheet-> getHighestColumn (); //

PHP Class Attribute Class static variable access

Php has two types of class attributes: Class constants and class static variables. These two types are easy to cause confusion. Like static class methods and class instance methods, static class attributes and instance attributes cannot be redefined

Summary of php implementation multi-threaded Methods

It is clear that php does not support multithreading. However, it is a headache for people who need a multi-threaded feature. Fortunately, there are several solutions that can be solved, similar to multithreading. The following are my summary of the

PhpExcel in Encapsulation

/*** Array generation Excel* @ Author zouhao zouhao619@gmail.com* Example* $ Excel = new Excel ();$ Data = array (Array ('id' => 1, 'name' => 'destiny 1 '),Array ('id' => 2, 'name' => 'destiny 2 '));$ Header = array ('id', 'Role name ');$ Excel->

Implement tree and unlimited menus by recursion and reference

data = R: getAll ('select * from menu '); $ this-> teamData (); if ($ this-> rdata) return $ this-> rdata; return false;} function addMenu ($ data) {foreach ($ data as $ key => $ value) {if ($ valu E = 'enter the content! ') $ Data [$ key] = '';} if

Php ternary Computation

$ A = 2; $ a = 1? $ Test = "enterprise": ($ a = 2? $ Test = "region": $ test = "Other Places"); echo $ test; first, judge whether $ a is 1. If it is a direct output enterprise, if it is not to continue to judge, it is equivalent to embedding another

Total Pages: 12780 1 .... 12293 12294 12295 12296 12297 .... 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.