0

文字列コンテンツを渡すと正常に動作し、送信時に結果が表示されます。しかし、を使用して受信したWebページのコンテンツを渡すとescapeshellarg(strip_tags($text));. 画面には何も表示されません。

<?php
//sent has value "http://www.paulgraham.com/herd.html"
$url=$_POST['sent'];
$text = file_get_contents($url);
$temp=escapeshellarg(strip_tags($text));
//$temp="one two two"; If I pass $temp with string content it gives result
echo $temp;  //Echo $temp shows content of webpage 
$output=shell_exec("/home/technoworld/Videos/LinSocket/Modular/x '$temp'");
echo $output;
?>
4

1 に答える 1

0

ここに来てくれてありがとう:

私は答えを得ました:

<?php
//sent has value "http://www.paulgraham.com/herd.html"
$url=$_POST['sent'];
$text = file_get_contents($url);
$temp=escapeshellarg(strip_tags($text));
$output=shell_exec("/home/technoworld/Videos/LinSocket/Modular/x " . $temp);
echo $output;
?>
于 2013-09-02T09:29:16.923 に答える