Reputation: 1031
I'm adding a line to my php script:
exec('sed -i 1i'MAILTO=""' /var/spool/cron/' '.$clientName.');
But it shows me an error:
PHP Parse error: syntax error, unexpected T_STRING in /home/admin/myproject.pl/newclient/main.php on line 368
Parse error: syntax error, unexpected T_STRING in /home/admin/myproject.pl/newclient/main.php on line 368
Upvotes: 0
Views: 224
Reputation: 175048
I think the error says it quite well. You have a syntax error.
Perhaps this is what you wanted?
exec('sed -i \'1i MAILTO=""\' /var/spool/cron/'.$clientName);
Upvotes: 2