cam - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of cam.php
- <?php
- $img = $_POST['image'];
- $folderPath = "upload/";
- $image_parts = explode(";base64,", $img);
- $image_type_aux = explode("image/", $image_parts[0]);
- $image_type = $image_type_aux[1];
- $image_base64 = base64_decode($image_parts[1]);
- $fileName = uniqid() . '.png';
- $file = $folderPath . $fileName;
- file_put_contents($file, $image_base64);
- print_r($fileName);
- ?>
File Description
- cam
- PHP Code
- 23 Aug-2019
- 437 Bytes
You can Share it:
Latest PHP Pastes