Java 開発では、"\r\t\n <>" のような文字列を含むファイルに書き込む必要があります。これは、Java から PHP ファイルを書きたいからです。理解できない場合は、次の例を見てください。
BufferedWriter buffW = new BufferedWriter(fileW);
buffW.write("<?php\n\n\tclass MyClass {\n\tpublic function test()\n}\n}\n?>");
これは混乱したコードです。PHP でできるようにきれいに書きたいのですが、例として Java の代替方法を見つけることができません。
<?php
$mystring = <<<EOT
This is some PHP text.
It is completely free
I can use "double quotes"
and 'single quotes',
plus $variables too, which will
be properly converted to their values,
you can even type EOT, as long as it
is not alone on a line, like this:
EOT;
?>