Encountered in the study can not use the array map to delete files, error is the callback function unlink there is a problem ~ please help! Thank!

Source: Internet
Author: User
Tags glob
$map_dir_arr=glob('cel\*');array_map('unlink',$map_dir_arr);rmdir('ce1');

The error is:
Notice:use of undefined constant unlink-assumed ' unlink ' in D:\DEMO\study\document\doc6.php on line 44

Line 44 is the second line in the statement.
Also encountered a lot of problems: I listen to the free video of the backing net, is too poor/(ㄒoㄒ)/~~, inside the teacher dozen code does not error, and I hit the same error, because the video is 11, and now the version has been changed?

Originally thought is no quotation mark reason, the result adds also error, the video teacher did not add the quotation marks, the younger brother beginner, please each road immortal helps, by the way wishes everybody Happy New Year ~ ~ ~

Reply content:

$map_dir_arr=glob('cel\*');array_map('unlink',$map_dir_arr);rmdir('ce1');

The error is:
Notice:use of undefined constant unlink-assumed ' unlink ' in D:\DEMO\study\document\doc6.php on line 44

Line 44 is the second line in the statement.
Also encountered a lot of problems: I listen to the free video of the backing net, is too poor/(ㄒoㄒ)/~~, inside the teacher dozen code does not error, and I hit the same error, because the video is 11, and now the version has been changed?

Originally thought is no quotation mark reason, the result adds also error, the video teacher did not add the quotation marks, the younger brother beginner, please each road immortal helps, by the way wishes everybody Happy New Year ~ ~ ~

function MyFunction ($v)
{
Return ($V * $v);
}

$a =array (1,2,3,4,5);
Print_r (Array_map ("MyFunction", $a));
?>

Unlink method not written??

  • 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.