Created
April 6, 2019 12:47
-
-
Save waqaskhan409/c097c0b7dbf66b704bbfa77a216c939c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $fileName = "task1.jpg"; | |
| // $fileName = $fileName . basename($_FILES['uploaded_file']['name']); | |
| if(isset($_FILES['image']['name'])){ | |
| $image = $_FILES['image']['name']; | |
| $tmpFile = $_FILES['image']['tmp_name']; | |
| $error = $_FILES['image']['error']; | |
| $location = 'token/'; | |
| if(!empty($image)){ | |
| if(move_uploaded_file($tmpFile , $location.$fileName)){ | |
| runSer(); | |
| }else{ | |
| echo "Lol"; | |
| } | |
| } | |
| else { | |
| echo "error"; | |
| } | |
| } | |
| else { | |
| echo "no Image found"; | |
| } | |
| function runSer(){ | |
| echo shell_exec('python LoadALexNetModel.py token/task1.jpg 2>&1'); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment