<script language="JavaScript"> webcam.set_api_url('test.php'); webcam.set_quality(90); // JPEG quality (1 - 100) webcam.set_shutter_sound(true); // play shutter click sound </script>
jpegcam與codeigniter
我嘗試在我的網站(我使用codeigniter)jpegcam。 和我不能加載我的webcam.swf或webcam.php或test.php。 我怎樣才能達到PHP在JavaScript loke這codeigniter?
當我刷新我的網站theres沒有做到這一點,但是當我嘗試jpegcam(沒有codeigniter)其作品很好。爲我愚蠢的問題抱歉,即時通訊新的使用CodeIgniter,
<table><tr><td valign=top>
<h1>JPEGCam Test Page</h1>
<!-- First, include the JPEGCam JavaScript Library -->
<script type="text/javascript" src="webcam.js"></script>
<!-- Configure a few settings -->
<script language="JavaScript">
webcam.set_api_url('test.php');
webcam.set_quality(90); // JPEG quality (1 - 100)
webcam.set_shutter_sound(true); // play shutter click sound
</script>
<!-- Next, write the movie to the page at 320x240 -->
<script language="JavaScript">
document.write(webcam.get_html(320, 240));
</script>
<!-- Some buttons for controlling things -->
<br/><form>
<input type=button value="Configure..." onClick="webcam.configure()">
<input type=button value="Take Snapshot" onClick="webcam.snap()">
</form>
<!-- Code to handle the server response (see test.php) -->
<script language="JavaScript">
webcam.set_hook('onComplete', 'my_completion_handler');
function my_completion_handler(msg) {
// extract URL out of PHP output
if (msg.match(/(http\:\/\/\S+)/)) {
var image_url = RegExp.$1;
// show JPEG image in page
document.getElementById('upload_results').innerHTML =
'<h1>Upload Successful!</h1>' +
'<img src="'+image_url+'">';
}
else alert("PHP Error: " + msg);
}
</script>
</td><td width=50> </td><td valign=top>
<div id="upload_results"></div>
</td></tr></table>
請幫助我,非常感謝