If you do not want to delete the library, just want to delete all the tables in the library, then use this script it OH
Very convenient.
The following is the referenced content:.
$hostname = ' localhost ';$userid = ' user
PHP//./TP//./tp/public functionDeldir ($dirname) { if(!file_exists($dirname)) { die("folder does not exist!")); } //if it is a file, delete it directly if(Is_file($dirname)) { unlink($dirname); Exit(); }
Delete a cell element at the beginningArray_shift(PHP 4, PHP 5)Array_shift - moves the cell at the beginning of the array to the groupDescription mixed Array_shift ( array & $array ) arra Y_shift () will array is moved out
PHP effective way to delete cookies
PHP effective way to delete cookiesInstructions for deleting a cookie start-----
BOOL Setcookie (string name [, string value [, int expire [, String path [, string domain [, bool secure]]])
To delete a cookie,
Don't say much nonsense, just paste the code. This article embodies the simplicity
Copy the Code code as follows:Delete all empty directories under directoryArray_map (' RmDir ', glob (' * ', glob_onlydir));Delete directory All filesArray_map ('
For a PHP array, how do you delete the first element or the last element of the array? In fact, both of these processes can be done through PHP's own functions Array_pop and Array_shift, the following is a detailed description of how to operate.(1)
Copy Code code as follows:
– Delete multiple static pages generated by an article
– the generated article name is 5.html 5_2.html 5_3.html
/*—————————————————— */
function delstatichtml ($article _id)
{
Global $db;
$sql = "Select '
Copy Code code as follows:
Delfile ("Upload", 10);
function Delfile ($dir, $n)//delete all files created by n minutes before the dir path;
{
if (Is_dir ($dir))
{
if ($dh =opendir ($dir))
{
while (false!== ($file = Readdir ($DH)))
{
if (
With this applet, Phper will 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 Browsing folder directory, and then
Copy Code code as follows:
@mysql_connect ("localhost", "root", "1981427")//Select database before you need to connect to the database server
Or Die ("Database server Connection Failed");
@mysql_select_db ("test")//Select Database MyDB
Or
To remove a cookie, you need to ensure that its expiration period is in the past in order to trigger the browser's deletion mechanism
In PHP, we can use the Setcookie () function to set the browser's cookie information.
The common example code for
Do not say much nonsense, directly affixed to the code. This article embodies the simplicity
Copy Code code as follows:
Delete all empty directories under the directory
Array_map (' RmDir ', glob (' * ', glob_onlydir));
In PHP to delete the function is more specific than JS, in addition to the trim () function, there are LTrim () and RTrim () function, they have to delete the left and right space, in addition to these three functions can also use regular
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.