-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstartfirefox.inc.php
More file actions
41 lines (39 loc) · 1 KB
/
startfirefox.inc.php
File metadata and controls
41 lines (39 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
# greatagent-ga - Software suite for breakthrough GFW
# greatagent-wp - Software suite for breakthrough GFW
#
# startfirefox.inc.php - Start Firefox
function deldir($dir) {
//先删除目录下的文件:
$dh=opendir($dir);
while ($file=readdir($dh)) {
if($file!="." && $file!="..") {
$fullpath=$dir."/".$file;
if(!is_dir($fullpath)) {
unlink($fullpath);
} else {
deldir($fullpath);
}
}
}
closedir($dh);
//删除当前文件夹:
if(rmdir($dir)) {
return true;
} else {
return false;
}
}
if(file_exists("./FirefoxPortable/FirefoxPortable.exe")){
exec('start ./FirefoxPortable/FirefoxPortable.exe -no-remote "https://greatagent-ifanqiang.googlecode.com/git-history/web/ifanqiang2.htm"');
}
else{
echo "Don't Have FirefoxPortable.\r\n";
if(file_exists("./FirefoxPortable/Data/profile/cert8.db")){
@unlink("FirefoxPortable\Data\profile\cert8.db");
deldir("FirefoxPortable\Data\profile");
deldir("FirefoxPortable\Data");
deldir("FirefoxPortable");
}
}
?>