Php forcibly downloads the code of a specified type of file

Php forcibly downloads the code of a specified type of file // Download prompt // Site http://bbs.it-home.org Function downloadFile ($ file ){ /* Coded by Alessio Delmonti */ $ File_name = $ file;

The stored code is directly prompted when the phpheader function file is downloaded.

The stored code is directly prompted when the phpheader function file is downloaded. $ Filename = 'path + actual filename '; // File type Header ('content-type: application/pdf '); // Download the

PhpheaderContent-Type summary

PhpheaderContent-Type summary // Php heaer content-type // Programmer's house bbs.it-home.org collection // Add it to your favorites for future use. $ Mimetypes = array ( 'EZ '=>

Principles and code of uploading PHP image files

Principles and code of uploading PHP image files Php code uploads files or images, analyzes the upload principles for everyone, and provides specific code. it is recommended that you refer to and learn for beginners.1. create a file upload

Get operating system

Get operating system // Operating system Public function getOS (){ $ Agent = $ _ SERVER ['http _ USER_AGENT ']; $ OS = false; If (eregi ('win', $ agent) & strpos ($ agent, '95 '))

Are you a programmer or a programmer?

Are you a programmer or a programmer? Now I deeply understand that not only are there great differences between people, but also between programmers and programmers.Ordinary programmers simply complete their own tasks. after the tasks are

PHP class variables and members, and issues to be aware of during inheritance, access, and rewriting

PHP class variables and members, and issues to be aware of during inheritance, access, and rewriting Class Myclass { Public $ prop = 123; } $ Obj = new Myclass (); ?> The member

Php code for generating a dynamic image verification code

Php code for generating a dynamic image verification code Session_start (); Function random ($ len) { $ SrCStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; $ Strs = ""; For ($ I = 0; $ I {

Php code used to extract an image file and display it on a browser

Php code used to extract an image file and display it on a browser $ Size = getimagesize ($ filename); // Obtain mime Information $ Fp = fopen ($ filename, "rb"); // open a file in binary mode If (

Php-written webshell code with powerful kill-free tools

Php-written webshell code with powerful kill-free tools /* Title: PHP shell nokill T00L Blog: exploit-db.blogcn.com */ Error_reporting (0 ); @ Ini_set ('memory _ limit ','-1 '); Set_time_

Summary of php method for calling external shell

Summary of php method for calling external shell System ("/usr/local/bin/webalizer "); ?> Exec ()Prototype: string exec (string command [, string array [, int return_var])The exec () function is similar to

Php uses curl to determine whether a remote file exists

Php uses curl to determine whether a remote file exists // Determine the remote file Function check_remote_file_exists ($ url) { $ Curl = curl_init ($ url ); // Do not retrieve data

Several methods to prevent SQL injection in php

Several methods to prevent SQL injection in php /** * SQL Injection Prevention * @ Author: test@jbxue.com **/ /** * Reject SQL inject */ If (! Function_exists (quote )) {

Php uses Xpdf to read PDF content

Php uses Xpdf to read PDF content [Root @ localhost ~] # Mkdir-p/lcf/upan [Root @ localhost ~] # Mkdir-p/lcf/cdrom [Root @ localhost ~] # Mkdir-p/lcf/xpdf [Root @ localhost ~] # Cd/lcf/upan/ [Root @

Example of using phpword to generate a Word document in php

Example of using phpword to generate a Word document in php Require_once '../libs/PHPWord. php '; Require_once '../libs/PHPWord/IOFactory. php '; Require_once '.../../config. php '; //

Php parses XML document attributes and edits the code

Php parses XML document attributes and edits the code // Read xml $ Dom = new DOMDocument ('1. 0 '); $ Dom-> load ('data. XML '); $ Em = $ dom-> getElementsByTagName ('videoos '); // outermost node

Php user-defined function recursively replaces the content in the array

Php user-defined function recursively replaces the content in the array /** Desc: recursively replaces array content Link: bbs.it-home.org Date: 2013/2/22 */ Function arrContentReplact

An example of how to define a php long string (heredocument)

An example of how to define a php long string (heredocument) $ Xx = I am not long, I am not long, I am not long ,? Script school http://bbs.it-home.org Html;

Introduction to php's simple pseudo-static URL mechanism

Introduction to php's simple pseudo-static URL mechanism RewriteEngine On RewriteRule ^ index \. php $-[L] RewriteCond % {REQUEST_FILENAME }! -F RewriteCond % {REQUEST_FILENAME }! -D

A php code that accurately counts the number of online users

A php code that accurately counts the number of online users Using filename='online.txt '; // data file $ Cookiename = 'vgotcn _ onlinecount'; // cookie name $ Onlinetime = 600; // online validity

Total Pages: 12780 1 .... 2807 2808 2809 2810 2811 .... 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.