次のようなパスを生成しようとしています:
$PhotoName = the_title();
$DestinationFile = 'temp/watermarked/';
$DestinationFile .= $PhotoName;
$DestinationFile .= '.jpg';
the_title();投稿のタイトルを取得するWordpress関数です。投稿の名前が疑わしいと思われますecho。$PhotoNameただしecho $DestinationFile、文字列のその部分を印刷しない場合は、のようなものが表示されますが、その一部として印刷されるtemp/watermarked/.jpgことはありません$PhotoName。