私はファイルを受け取って保存する私のPHPファイルを持っています。正常に動作します。しかし、私はここでimage upload + thumbnail generator
(http://abeautifulsite.net/blog/2009/08/cropping-an-image-to-make-square-thumbnails-in-php/を使用して)それは同様のサムネイルを生成したいと思います私の現在のコードは次のとおりです。
<?php
$destination_path = getcwd().DIRECTORY_SEPARATOR . '/uploads/';
$result = 0;
$target_path = $destination_path . basename($_FILES['myfile']['name']);
if(@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) {
$result = 1;
square_crop($target_path, 'thumb.jpg');
}
?>
私はsquare_crop($target_path, 'thumb.jpg');
を使用しようとすると、私はラインif($image[0] > $image[1]) {
私はそれを間違った方法で使用していますか?ありがとう
とても分かりやすいので、私はおそらくいくつかの睡眠が必要です。しかし感謝:) – Johan
私は最初にそれを把握するために私を取った:) –