搜索
查看: 9025|回复: 2
打印 上一主题 下一主题

强行删除空间里的垃圾文件

[复制链接]

3192

主题

1

好友

-76

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
891
金钱
51631
积分
-76
帖子
34437
跳转到指定楼层
1楼
admin 发表于 2009-4-18 18:01 |只看该作者 |倒序浏览
如果你通过FTP在上传文件的时候发现自己的空间里发现有类似于.pureftpd-upload.446e2f48.15.1dc1.3385a655的文件无法删除(据说是 FTP 断点上传的临时文件;正常退出 FLASHFXP 时候自动删除的)可以建立一个PHP文件something.php,内容如下(PHP语法的格式请自己补齐):

$myFile = '.pureftpd-upload.446e2f48.15.1dc1.3385a655';
unlink($myFile);
?>


然后把something.php文件传入到与这个文件相同的目录中,再把这个目录的权限修改成777.然后在浏览器中运行something.php。

比如http://www.example.com/path/something.php

这样就可以删除那个该死的文件了。

如果你发现了多个文件可以在something.php中多加几句话:


$myFile = '.pureftpd-upload.446e2f48.15.1dc1.3385a655';
unlink($myFile);
$myFile2 = '.pureftpd-upload.1iU1dkC5.25.qN26.qN446e28';
unlink($myFile2);
?>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Let say you have undeletable file called.pureftpd-upload.446e2f48.15.1dc1.3385a655 in on your site you cantremove, well there is a simple solution to this problem.

You can create a PHP file called something.php, and place this code into it

$myFile = '.pureftpd-upload.446e2f48.15.1dc1.3385a655';
unlink($myFile);
?>


Now upload something.php to the folder that has the stubbornpureftpd-upload file in it, and change the persimmons of the folder to777 (and something.php) via CHMOD.
Next open something.php in you web browser via your domains URL, as anexample; web page http://www.example.com/path/something.php
Now the file has been deleted.

You MUST delate something.php and return the folder to the originalCHMOD (Normally 644) once you remove the folder for security.

If you have more then one .pureftpd-upload just make additional lines with the file such as

$myFile = '.pureftpd-upload.446e2f48.15.1dc1.3385a655';
unlink($myFile);
$myFile2 = '.pureftpd-upload.1iU1dkC5.25.qN26.qN446e28';
unlink($myFile2);
?>

32

主题

1

好友

643

积分

Administrator

Rank: 9Rank: 9Rank: 9

贡献
307
金钱
20731
积分
643
帖子
20597

VIP会员勋章 最佳优秀荣耀勋章 特殊贡献勋章 版主勋章 论坛富翁勋章 总版主勋章

2楼
find1way 发表于 2009-4-18 21:16 |只看该作者
有些高深
回复

使用道具 举报

0

主题

0

好友

0

积分

Amateur Investor

Rank: 1

贡献
15
金钱
2360
积分
0
帖子
8409

VIP会员勋章 最佳优秀荣耀勋章 论坛核心会员

3楼
ego369 发表于 2009-4-18 23:08 |只看该作者
55555555对俺来说简直就是天书!

PM:U1597281
回复

使用道具 举报

 懒得打字嘛,点击右侧快捷回复【左侧自定义内容】  【右侧自定义内容】
您需要登录后才可以回帖 登录 | Register

Mobile|Archiver|Naale Community

GMT+8, 2024-4-25 14:36 , Processed in 0.031332 second(s), 12 queries , Apc On.

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部