forked from qwerty/milfs
Inclusion de variables en includes/datos.php
This commit is contained in:
parent
c62e1420ba
commit
c2fe6f4631
@ -11,7 +11,7 @@ if(!isset($_GET['file']) ){
|
||||
header("Location: ../sinimagen.jpg");
|
||||
|
||||
}
|
||||
$dir='../../../../images_secure/';
|
||||
$dir="$_SESSION[path_images_secure]/";
|
||||
if ((!$file=realpath($dir.$_GET['file']))
|
||||
|| strpos($file,realpath($dir))!==0 || substr($file,-4)=='.php'){
|
||||
//header('HTTP/1.0 404 Not Found');
|
||||
|
@ -6,5 +6,6 @@ $db="milfs";
|
||||
$path_instalacion ="/var/www/html/milfs";
|
||||
$path_images_secure ="/var/www/images_secure";
|
||||
$url = "http://localhost/milfs";
|
||||
/// Depende de la variable http://php.net/upload-max-filesize o en el .htaccess
|
||||
$upload_size = 6 ; // Tamaño permitido para las imagenes en MB
|
||||
?>
|
||||
|
@ -23,7 +23,8 @@ if (isset($_FILES['fileUpload']['tmp_name'])) {
|
||||
// $nombre =MD5(time()).".jpg";
|
||||
// (2) - Comprobamos que se trata de un archivo de imágen
|
||||
//if ($tipo == 'image/jpeg' AND $size <= 4000000 ) {
|
||||
if (($tipo == 'image/jpeg' or $tipo =='image/png') AND $size <= 10000000 ) {
|
||||
$upload_size = ($_SESSION[upload_size]*1024*1024);
|
||||
if (($tipo == 'image/jpeg' or $tipo =='image/png') AND $size <= $upload_size ) {
|
||||
// (3) Por ultimo se intenta copiar el archivo al servidor.
|
||||
$name = MD5(time())."$ext";
|
||||
$nombre= "$_SESSION[path_images_secure]/full/".$name;
|
||||
|
Loading…
Reference in New Issue
Block a user