私はescapeshellargを使用してphpからperlに渡しています
system("perl -e '" . escapeshellarg($inp) . "' >> /tmp/out");
そして、perlから終了していない引用符で囲まれた文字列を取得します。
入力は次のとおりです。'Single quoted terminated string\n';
私はescapeshellargを使用してphpからperlに渡しています
system("perl -e '" . escapeshellarg($inp) . "' >> /tmp/out");
そして、perlから終了していない引用符で囲まれた文字列を取得します。
入力は次のとおりです。'Single quoted terminated string\n';
escapeshellarg
外側の一重引用符自体を追加することに注意してください。
したがって、それらを除外する必要があります。
system("perl -e " . escapeshellarg($inp) . " >> /tmp/out");
# ^ ^ no extra ' quotes here