PHP get file Suffix name method

Here are three ways to get the name of the file prefix a friend you need to refer to. Method One:function Extend_1 ($file _name){$retval = "";$pt =strrpos ($file _name, ".");if ($pt) $retval =substr ($file _name, $pt +1, strlen ($file _name)-$pt)

PHP Infinite Class Classification Instance three

Database Tutorials ----Table structure for table ' category '--CREATE TABLE IF not EXISTS ' category ' (' id ' int (one) not NULL auto_increment,' Catpath ' varchar (255) DEFAULT NULL,' Name ' varchar (255) DEFAULT NULL,PRIMARY KEY (' id '))

PHP Read txt file Chinese garbled solution

1: If you open the page has garbled, don't worry, do not do any editing first. Remember.2: Then click the menu to Modify-"page Properties-" title/code3: In the Code select Simplified Chinese (gb2321)4: Click Reload-"OK" Create a new Notepad (not a

A collection of functions commonly used in PHP

function GetIP () {if (getenv (' http_client_ip ') && strcasecmp (getenv (' http_client_ip '), ' unknown ')) {$onlineip = getenv (' http_client_ip ');} elseif (getenv (' http_x_forwarded_for ') && strcasecmp (getenv (' http_x_forwarded_for '), '

PHP Delete record and delete picture file program

*/$CN = MySQL Tutorial _connect (' 127.0.0.1 ', ' root ', ' root ') or Die (' Database connect fail ');mysql_select_db (' Test ', $CN);mysql_query ("Set names ' GBK '"); /*Create a database tutorialCREATE DATABASE ' test '; Create data Table Test1

PHP ob_flush,flush in IE buffer Invalid solution

PHP programs are buffered, regardless of the circumstances in which PHP executes (CGI, Web servers, etc.). This function sends all the output of the program so far to the user's browser.The flush () function does not affect the caching mode of the

PHP FAQ and workaround two up

15: What is UBB code UBB code is a variant of HTML, is Ultimate Bulletin Board (a foreign BBS program, there are many places in the domestic use of this program) a special tag.Even if you prohibit the use of HTML, you can use Ubbcode? Maybe you'd

Example Simple PHP picture upload class

Class uploadimg{Private $_filename= ""; File domain name as ' userfile 'Private $_uploaddir = '; Upload path such as./upload//* Upload parameter configuration * *Private $_config = Array (' Type ' =>array (' image/jpeg ', ' image/jpg ',' Image/pjpeg

PHP file_get_contents function to easily capture ip138 data

Nationally, the criterion is whether $request_uri contains HTMLif (!strpos ($_server["Request_uri"], ". html")){$page = "http://qq.ip138.com/weather/";$html = file_get_contents ($page, ' R ');$pattern = "/ National main cities, counties and the next

PHP's perfect batch generation thumbnail code

Generate thumbnails $c = Array (' dir ' => './images ', ' newdir ' => './thumb ', ' W ' => ', ' h ' => ' 200 ');Process only files that contain small in the file name, and if all files are processed, set to '. '$only = '. '; Set this row to 0 if

Introduction to PHP-User Registration Instance program full version

Create a Database Tutorial connectionMySQL tutorial _connect (' localhost ', ' 111cn.net ', ' www.111cn.net ');mysql_select_db (' www.111cn.net ');//Database selectionmysql_query (' Set names "GBK"); Progress Query Operations?>     username

PHP's simplest example tutorial for generating XML documents

MySQL tutorial _connect (' localhost ', ' root ', ' 1****** ') or Die (' database server no exists! ');mysql_select_db (' wk ') or Die (' Database error! ');mysql_query ("SET NAMES ' GBK '");//set document CharSet encode function Createxml () {

PHP Introductory Tutorial Simple PHP User Login Complete Tutorial

@session_start (); MySQL tutorial _connect (' localhost ', ' root ', ' 19860427 ') or Die (' database server no exists! '); mysql_select_db (' wk ') or Die (' Database error! '); mysql_query ("SET NAMES ' GBK '");//set document CharSet encode

PHP gets the current URL domain name instance code

PHP tutorial get current URL domain name instance codefunction getServerName (){$ServerName = strtolower $_server[' server_name ']?$_server[' server_name ']:$_server[' http_host ']);if (Strpos ($ServerName, ' http://')){Return Str_replace (' http://'

PHP Var_export Read-write instance class

;? //php Tutorial Var_export Read-write instance Class class user{  var $filepath;  function __ ()  {  & nbsp. $this->filepath = "d:/www.111cn.net/group/";  }  function Cache () {    $array = $this->db->select (' Select Group_id,group_name from

PHP analog user gets remote file content

1,ini_get:returns The value of the configuration option as a string on success, or a empty string on failure (read PHP teaching The value in the path. ini configuration file) 2,; Whether to allow the treatment of URL (like http://or ftp://) as

Free space for php outside China

Free hosting features:Up to MB data traffic is free of space! Speed up to 750 mb! Free! *RAID backed up every day + $5 free! *PHP 4 with databases (transfer positive domains or proofs to appropriate HTML websites)Small-scale industry (including

Free php space

Application address: https://r187249.res.worldispnetwork.com/psoft/servlet/psoft.hsphere.CPUnlimited bandwidth-250 Mb HDD-PHP v. 5-3 MySQL databases-Shared IP-POP 3 and IMAP-CPanel + Fantastico-FTP and SSH-Your domain-No adsApplication address: http:

Common PHP program to connect to SQLServer database

Many of my friends asked me how to use a php program to connect to a common class of SQL Server database. In fact, this is not very difficult. The key point is to be careful, patient, and understanding with passion.Class DB {Var $ Host = "192.168.0.1

Five most common PHP database problems for programmers and their explanations

ExposurePHPFive common problems in applicationsDatabaseProblems-including database pattern design, database access and use of database business logic code-and their solutions.If there is only one way to use the database, it is correct ......You can

Total Pages: 12780 1 .... 4170 4171 4172 4173 4174 .... 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.