miladanimator
Active Member
...
...
...
آخرین ویرایش:
سلام . منظورت از 30 کاراکتر چیه ؟ یعنی بیشتر از 30 کاراکتر باشه پسورد یا 30 کاراکتر اسم یه سایت هست ؟در ضمن این هم فراموش نشه که کلا پسورد و یوزر نیم های سی پنل یا مای اس کیو ال رو از 30 کاراکتر بگیرین هکر ها میان یک هاست می خرن که از سرور شما باشه بعد اون طریق پسورد سی پنل رو کرک می کنند
تو رو خدا یکی بگه من فایلها و فولدرهام رو روو چه پرمیشنی ست کنم ؟هواستون به سطح دسترسی فایل ها باشه
// This file is the place to store all basic functions
function mysql_prep($value)
{
$magic_quotes_active = get_magic_quotes_gpc();
$new_enough_php = function_exists("mysql_real_escape_string"); // i.e. PHP >= v4.3.0
if ($new_enough_php)
{ // PHP v4.3.0 or higher
// undo any magic quote effects so mysql_real_escape_string can do the work
if ($magic_quotes_active)
{
$value = stripslashes($value);
}
$value = mysql_real_escape_string($value);
} else
{ // before PHP v4.3.0
// if magic quotes aren't already on then add slashes manually
if (!$magic_quotes_active)
{
$value = addslashes($value);
}
// if magic quotes are active, then the slashes already exist
}
return $value;
تابع بسیار عالییهمن از این تابع استفاده میکنم
function injection($str_input)
{
get_magic_quotes_gpc() ? $str_output= &stripslashes(&$str_output) : $str_output= &addslashes(&$str_output);
return(htmlentities(mysql_real_escape_string(&$str_output), ENT_QUOTES, 'UTF-8'));
}
یا
function injection($str_input)
{
$str_output= &htmlentities(&$str_input, ENT_QUOTES,'UTF-8');
if(get_magic_quotes_gpc()): $str_output= &stripslashes(&$str_output);
endif;
return(mysql_real_escape_string(&$str_output));
}