C ++是否可以将包含换行符的文本传递给C ++程序?

I am calling a C++ program via PHP, using the system() function:

$use = '"' . $_POST['source'] . '"';
system("Subject " . $use);

where $use stores some text that might contain line breaks and that gets itself passed to the PHP program using the $_POST variable. If I pass this variable to the C++ program and the contained text has line breaks, then only the first line gets passed to the program. I tried to avoid this by using the two quotation marks, but this doesn't work. So if the input is for example

word 1  
word 2

then only word 1 is passed to the C++ program. Conversely, if the input is of the form

word 1 word 2

then of course everything works fine.

How can I solve this if there is a solution at all?

You need to escape $use for the command line

system("Subject " . escapeshellarg($use))

As I understand you only need to replace line breaks with spaces:

$use= str_replace ("
", " ", $use);