dtzd65908 2016-08-05 10:46
浏览 16

隐藏数组中的文件并显示其他内容

I have my delete function after file is deleted it will print all deleted file in array like this bellow

Array (

[0] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\default.php

[1] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt.htaccess

[2] => [Directory]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt

[3] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\page.html

)

The main directory is jquery-sandbox

And sub directory which was deleted and it file content is zuuttt

Now my problem is that i have two files inside zuuttt which i don't want it to show it deleted array list i want it to be hidden i tired to do this but it still show the files.

<?php
//The delete is working fine and below here is from my class
$result = $rmjails->remove($deletethis);

//This is what i tried to hide it with
if(is_array($result)){
$hide = array('.htaccess','default.php');
$filtered_array = array_filter($result, function ($element) use ($hide) { return ($element != $hide); } );
print_r($filtered_array);
}

//==============
//This is default one i was using

if(is_array($result)){
print_r($result);
}
?>

How can i hide that two files .htaccess and default.php?

2 additional questions

My question yesterday was not answers till now please i need a help about that

Having multiple htaccess in a root directory

How can i print out the deleted files and directories without showing it in array Array ([0] => [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\default.php) so it will look like this [File]: C:\xampp\htdocs\public_html\cjl\jquery-sandbox\zuuttt\default.php

Thank you

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度