Ciaux a tutti ho scaricato uno script php per fare in modo che gli utenti possano uppare immagini .... la guida mi spiega solamente questo...
Installation is very simple:
Import sql file located in the "inc" folder into mysql.
Then make needed changes to "inc/config.php"
This is all that is required to install our script, enjoy.
allora io ho aperto il file config e ho settato i permessi del database :
<?php
#FULL SYSTEM PATH TO STORE IMAGES WITH TRAILING /
$pathToImages = "/full/path/uploadedimages/";
#URL TO SEND BANNED USERS (GOOD SPOT FOR AFFILIATE PUSHING)
$bannedURL = "http://www.google.com";
#Max Image Size In Bytes
$maxImageSize = 2097152;
#THUMB SIZES
$new_w = 150;
$new_h = 150;
#File Types Allowed - No point to really change this
$fileExt = array("jpg", "jpeg", "png", "gif", "bmp");
#FULL SITE WITH SLASH URL http://www.shareimmage.com/
$siteUrl = "http://www.shareimmage.com/";
$siteName = "Image hosting - shareimmage.com";
$domain = "shareimmage.com";
#Database Information
$databaseHost = "localhost";
$database = "share";
$dbuser = "share";
$dbpass = "pass del database..........";
#default meta tags
$title = "Image Hosting - shareimm_share";
$description = "Uppa le tue immagini gratuitamente";
$keywords = "image hosting , free image hosting , image hosting system , image hosting php , do free image hosting , asp.net image hosting , complete image hosting ";
#DO NOT EDIT BELOW
mysql_connect($databaseHost,$dbuser,$dbpass);
mysql_select_db($database);
$userIp = $_SERVER['REMOTE_ADDR'];
$sql = "SELECT * FROM banned WHERE ip LIKE '$userIp'";
$numUser = mysql_num_rows(mysql_query($sql));
if ($numUser != 0) {
if (!isset($admin)) {
header("Location: ".$bannedURL);
exit();die();
}
}
function kb2mb($kb) {
$mb = number_format($kb/1048576,2);
return $mb;
}
function getFileExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return trim($ext);
}
?>
carico il mio bel file e mi escono questi due errori:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home4/shareimm/public_html/includes/config.php on line 53
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home4/shareimm/public_html/index.php on line 18
Che posso fare??????
Il sito in questione è http://www.shareimmage.com/
Installation is very simple:
Import sql file located in the "inc" folder into mysql.
Then make needed changes to "inc/config.php"
This is all that is required to install our script, enjoy.
allora io ho aperto il file config e ho settato i permessi del database :
<?php
#FULL SYSTEM PATH TO STORE IMAGES WITH TRAILING /
$pathToImages = "/full/path/uploadedimages/";
#URL TO SEND BANNED USERS (GOOD SPOT FOR AFFILIATE PUSHING)
$bannedURL = "http://www.google.com";
#Max Image Size In Bytes
$maxImageSize = 2097152;
#THUMB SIZES
$new_w = 150;
$new_h = 150;
#File Types Allowed - No point to really change this
$fileExt = array("jpg", "jpeg", "png", "gif", "bmp");
#FULL SITE WITH SLASH URL http://www.shareimmage.com/
$siteUrl = "http://www.shareimmage.com/";
$siteName = "Image hosting - shareimmage.com";
$domain = "shareimmage.com";
#Database Information
$databaseHost = "localhost";
$database = "share";
$dbuser = "share";
$dbpass = "pass del database..........";
#default meta tags
$title = "Image Hosting - shareimm_share";
$description = "Uppa le tue immagini gratuitamente";
$keywords = "image hosting , free image hosting , image hosting system , image hosting php , do free image hosting , asp.net image hosting , complete image hosting ";
#DO NOT EDIT BELOW
mysql_connect($databaseHost,$dbuser,$dbpass);
mysql_select_db($database);
$userIp = $_SERVER['REMOTE_ADDR'];
$sql = "SELECT * FROM banned WHERE ip LIKE '$userIp'";
$numUser = mysql_num_rows(mysql_query($sql));
if ($numUser != 0) {
if (!isset($admin)) {
header("Location: ".$bannedURL);
exit();die();
}
}
function kb2mb($kb) {
$mb = number_format($kb/1048576,2);
return $mb;
}
function getFileExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return trim($ext);
}
?>
carico il mio bel file e mi escono questi due errori:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home4/shareimm/public_html/includes/config.php on line 53
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home4/shareimm/public_html/index.php on line 18
Che posso fare??????
Il sito in questione è http://www.shareimmage.com/