WebShareDemo / share.php
root on 25 May 2022 1 KB typo
$picfile = "/var/www/public_html/ws3/pic.jpg";

if(strlen(basename($_FILES["image"]["name"])) > 0){
  $stripped = trim(str_replace(" ","", $_FILES["image"]["name"]));

  if(move_uploaded_file($_FILES["image"]["tmp_name"], $picfile)){
    echo "Ok!";
    echo "Error copying! ".$_FILES["image"]["tmp_name"]." to ".$picfile." reason:". $_FILES["image"]["error"] ;
  echo "Error uploading!";


<!DOCTYPE html>
<html lang="en">
    <title>Web Share Target Demo</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- import the webpage's stylesheet -->
    <link rel="stylesheet" href="./style.css">
    <!-- Manifest -->
    <link rel="manifest" href="./manifest.json">
      Img Upload Demo
      <b>href:</b> <code><span id="href"></span></code>
    <img src="//<?php echo "?".time(); ?>" width="100%" />