-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
62 lines (43 loc) · 1.08 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
<meta charset="utf-8"></meta>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<center>
<div>
<img src="img/default.jpeg" class="image">
</div>
<input type="file" id="profile_image" class="btn btn-primary"></input>
<br><br><br>
<div id="resultado"></div>
</center>
</body>
</html>
<script>
$(function(){
$('#profile_image').change( function(e) {
var img = URL.createObjectURL(e.target.files[0]);
$('.image').attr('src', img);
});
$('#profile_image').click(function(){
$.ajax(
{url: "carregar.php",
success: function(result){
$("#resultado").html(result);
$( "#msg" ).slideUp( 300 ).delay( 2500 ).fadeIn( 800 );
}});
});
});
</script>
<?php
if(!file_exists($ac)){
mkdir("/opt/lampp/htdocs/images", 0777,true);
}else{
echo 'NON existe';
}
echo $ac;
?>