I'm trying to execute a shell command from php using the exec command
The following command works
echo exec('whoami');
but I need to execute the following shell command
cat > /var/www/myfolder/abc.txt
hi
hello
welcome
the problem is that the above shell command has to be executed in multiplelines. The words "hi", "hello", "welcome" are dynamic and come from php variables. Is there a workaround for this problem.