我有两个页面
a.php<?php
echo '1';
?>b.php$opts = array('http'=>array('method'=>"GET",'timeout'=>3,));
$context = stream_context_create($opts);
$open =file_get_contents("http://127.0.0.1/a.php", false, $context);
if($open=='1'){
echo '2'
}
为什么$open=='1' 为false?a.php改怎么写才能让$open=='1' 为true?
a.php<?php
echo '1';
?>b.php$opts = array('http'=>array('method'=>"GET",'timeout'=>3,));
$context = stream_context_create($opts);
$open =file_get_contents("http://127.0.0.1/a.php", false, $context);
if($open=='1'){
echo '2'
}
为什么$open=='1' 为false?a.php改怎么写才能让$open=='1' 为true?
echo 'true';
}