. . mb_substr() ................................................................................ echo mb_substr($text, 0, 39, 'UTF-8'); ............................................................. <html> <head> <title> </title> </head> <body> <p><strong> :</strong><br /> <form enctype="multipart/form-data" method="post"> <input type="file" name="userfile" /> <br /> <input type="submit" value="" name="button"> </form> <?php // if($_POST['button']== true){ // .php . $path = array(".php",".php4",".php3",".phtml",".pl"); foreach ($path as $item){ // if(preg_match("/$item\$/i", $_FILES['userfile']['name'])) { echo " , <br />"; echo "<a href='index.php'>&lt;&lt;&lt; </a>"; exit(); } } // , if($_FILES['userfile']['error'] != 0){ // , $error = fopen("error/error.dat","wb"); if(fwrite($error,$_FILES['userfile']['error']) == false){ echo " !!!"; exit(); }else { echo "<b>error.dat</b> - ! &nbsp;&nbsp;<a href='error/error.inc'> </a>"; // unlink($_FILES['userfile']['tmp_name']); // exit(); } fclose($error); } // , $dir = 'img/'; $file = $dir.basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $file)) { echo " ."; } else { echo " "; exit; } } ?> </body> </html> ................... <?php // // // : Mr.Edward function resizeimg($file, $width) { $info = getimagesize($file); $koe = $info[0]/$width; $height = round($info[1]/$koe); $img = imagecreatetruecolor($width, $height); if($info[2]==1) $img_src = imagecreatefromgif($file); if($info[2]==2) $img_src = imagecreatefromjpeg($file); if($info[2]==3) $img_src = imagecreatefrompng($file); imagecopyresampled($img, $img_src, 0,0,0,0, $width, $height, $info[0], $info[1]); header('Content-type: image/gif'); imagegif($img); } resizeimg('image.gif', '100'); // ?> ................................................................................ // $mode = preg_replace('/\0/s', '', $mode); ................................................................................ /, . trim, . foreach($_POST as $key => $value) $_POST[$key] = trim($value); POST . GET - foreach($_GET as $key =>
далее
перейти
в начало
В библиотеку

на главную



..
(c) xika.ru