[root@file Engineer]# ls resume_Al_Kassar_9-29-08.doc.txt^M
resume_Al_Kassar_9-29-08.doc.txt?
[root@file Engineer]#
But I browse into that directory by "File Transfer Window",didn't see ^M at all
it's simply "resume_Al_Kassar_9-29-08.doc.txt"
Any anyone step into this issue ever?And how to solve this?
This .txt^M file is generated by another program,and is processed by "bashFileConvert" function(it's a PHP function).
$toF = bashFileConvert($toF);//this step generated ^M
$cmd = "$parser $file $arrow_str $toF";
How can I get rid of this annoying ^M?
Later on I found:
$arrow_str = $arrow ? '>' : '';
$file = bashFileConvert($file);
$toF = bashFileConvert($toF);
$cmd = "$parser $file $arrow_str $toF";
echo $cmd . "\r\n";
file_put_contents('resumeSh',$cmd."\r\n",FILE_APPEND);
It should be the last line that caused this issue!