/**********************
* @file-path to zip file
* @destination-destination directory for unzipped files
*/
function Unzip_file ($file, $destination) {
Create Object
$zip = new Ziparchive ();
Open Archive
!--?
/*
get extension of file
usage: getfiletype ($filename)
*/
Function Getfiletype ($Filename) {
if (Substr_count ($Filename, ".") = = 0) {//Check the file name for a. Number.
A company project needs to crawl the thumbnail of the PDF, some recent thumbnails can not be displayed in IE browser, but can be displayed in Google Chrome. Finally found that can not display the picture image color is cmky, and cmky in IE browser
Unserialize (Iconv (' GBK ', ' Utf-8 ', serialize ($array)));
Copy CodeThe result is blank.With the Var_export function, the final function is as follows:
function Array_iconv ($in _charset, $out _charset, $arr) {
This article introduces the method of executing PHP program with crontab timing in Linux system. Please refer to the friends who are in need.In Linux, the method of executing PHP with crontab Timing is implemented as follows:1. Use Crontab-e to edit
$a = fopen (' test.txt ', ' R ');
There is no judgment on the file opened, if the file does not exist will be an error
?>
Copy CodeThe correct wording:
if (file_exists (' Test.txt ')) {
!--? php
//So-called hyphenation (word break), that is, a word can be in a row The place to disconnect. This function truncates the string at the hyphenation point.
//Please acknowledge use of this code by including the
This article describes the method of removing element values from the header of a PHP array, with the need for a friend reference.This section describes how to delete values from the header of a PHP array.It can be implemented with the PHP array
/**
* Traverse and parse XML file as an array
* Edit bbs.it-home.org
*/
Public Function Parsexml ($menus) {
$result = Array ();
foreach ($menus as $menu) {
$tmparr = Array ();
Handling empty text node
This article describes the following, Smarty template engine, generate static pages of the key code, with the need for friends, refer to the next bar.In Smarty, there is a method fetch () that gets the template page content, and it declares the
This article describes the method of configuring PHP environment variables in windows, with the need for friends, refer to the next bar.PHP adds environment variables to unzip PHP, for example, to "d:/php".Then, right-click My Computer, properties,
This article introduces the three functions Strtr, Str_replace and Preg_replace, which are used in PHP for string processing, in the comparative analysis of efficiency. If you need a friend, refer to it.Below compare the efficiency of STRTR,
This article describes the check box for the checkbox in PHP to get the value, and the output method for the checkbox default value. For everyone to learn the reference.First, take a look at the CheckBox check box value method. checkbox to use an
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