/** * Download remote picture to local * * @param string $url remote file address * @param string $filename the saved file name (the file name is randomly generated when empty, otherwise the original file name) * @param array $fil EType allowed
With this applet, phper do not have to manually delete the directory files on the computer, in the practice of PHP directory file operation can use this function, on this basis can also increase the Browse folder directory, and then delete.
Code
Php verification code image here we will introduce the preparation of the image verification code. for the character verification code, refer to the following article:
Click Open link
The image verification code can be created in three steps:
In fact, it has nothing to do with the upper layer, mainly through C to complete the basic operations of files. Sorry, you don't have enough time to talk about it. Stick it to the key.Code.
Key File Code:
Mainactivity. Java
Package com. Scan.
Reprinted from
Http://blog.163.com/skynjl/blog/static/603053922009127101558356/
Today, my colleague asked me to write a shell script. Although I am deeply influenced by * nix, it is annoying to execute sh scripts that are everywhere in *
1. PHP __file__ Constants (How to get the root directory)
The dirname (__file___) function returns the path where the script is located.
For example, the file b.php contains the following content:
$basedir = DirName (__file__);
?>
If b.php is
PHP Verification code--image
Here we introduce the production of image verification code, the character verification code can refer to the following articles:
Click to open link
The production of the picture verification code is divided into three
?
It is convenient to call this class to view all the files in the specified directory in a tree structure, if you want to know what subdirectories and files are in a directory.
# Examples of demonstrations:
$t = new Treeclimber ("ASP"); Create a
1. PHP __file__ Constants (How to get the root directory)
The dirname (__file___) function returns the path where the script resides.
For example, file b.php contains the following:
$basedir = DirName (__file__);
?>
If b.php is referenced by a.php
The example of this article tells the PHP magic variable usage, which __dir__ is php5.3 new, share for everyone reference. The specific usage analysis is as follows:
System constants
__file__ Current file name__LINE__ the current number of
More community recently, considering the security of data, to backup the database once a day, just in case;Linux is not very well known, first use the windows of the scheduled task it;The general idea is to borrow a scheduled task from Windows to
A shell script that backs up a database
Copy Code code as follows:
#!/bin/bash
#指定运行的脚本shell
#运行脚本要给用户执行权限
Bakdir=/backup
Month= ' Date +%m '
day= ' Date +%d '
Year= ' Date +%y '
Hour= ' Date +%k '
min= ' Date +%m '
/// /// System. directoryservices. directoryentry de = new directoryentry ();/// De. Path = @ "IIS: // localhost/w3svc/1/root/dir1/dir2/dir3 ";/// Recursivesetiiswebdirectory (de );/// De. properties ["accessflags"] [0] = 513;/// De. commitchanges ()
Summary of require and include path issues in PHP, Requireinclude
1 absolute path, relative path, and indeterminate path
Relative path
A relative path refers to a path that begins with a.
./a/a.php (相对当前目录) ../common.inc.php (相对上级目录),
Absolute
Summary of common functions of jQuery Mobile for HTML5 operations, jqueryhtml5
1. $. mobile. changePage () & $. mobile. loadPage ()1. $. mobile. changePage ()
$. Mobile. the changePage () method is automatically called when the page is loaded. If
Back up database shell script 1
Copy codeThe Code is as follows :#! /Bin/bash
# Specify the running script shell
# Run the script to grant the user the execution permission
Bakdir =/backup
Month = 'date + % m'
Day = 'date + % d'
Year = 'date + %
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.