次のコードを使用してpngファイルをコピーしようとしています
$cty2 = 'filename';
fwrite($fh, $stringData);
$old = 'images/bg_freeze.png';
$new = 'images/$cty2.png';
copy($old, $new) or die("Unable to copy $old to $new.");
fclose($fh);
しかし、結果はこの名前 ( $cty2.png ) の png ファイルです ( filename.png )
新しいファイル名(filename.png)を($cty2.png)にしないように解決する方法