mucked about with Telnet

This commit is contained in:
Me
2022-08-13 03:01:41 +02:00
parent a69273b88e
commit 3495ff19a8
6 changed files with 61 additions and 8 deletions

View File

@@ -10,8 +10,9 @@
# echo("File was uploaded successfully!");
// this part needs to be grabed from POST uri
//$target_dir = "./www/uploaded/";
$target_dir = $_POST["upload_dir"];
$target_dir = "./www/uploaded/";
//$target_dir = $_POST["upload_dir"];
//$target_dir = $_GET["upload_dir"];
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$fileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));

View File

@@ -114,7 +114,7 @@ void Webserv::_autoindex(Client *client, const std::string &path)
struct dirent *ent;
// std::cout << "location root: " << client->assigned_location->root << " location path: "
<< client->assigned_location->path << '\n';
// << client->assigned_location->path << '\n';
std::cout << "Path in auto is: " << path << '\n';
if ( (dir = opendir(path.c_str()) ) != NULL)