jQuery webcam plugin - saving image

China☆狼群 提交于 2019-11-30 16:25:06

You going to need to do a little PHP Here is a basic upload script, from the JPEGCam project

<?php

/* JPEGCam Test Script */
/* Receives JPEG webcam submission and saves to local file. */
/* Make sure your directory has permission to write files as your web server user! */

$filename = date('YmdHis') . '.jpg';
$result = file_put_contents( '/path/to/file/store/or/site/' . $filename, 
      file_get_contents('php://input') );
if (!$result) {
    print "ERROR: Failed to write data to $filename, check permissions\n";
    exit();
}

$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' 
     . $filename;
print "$url\n";

?>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!