3,)); $context ="/> 3,)); $context =">
Maison > Article > développement back-end > 用file_get_contents获取字符串有关问题
用file_get_contents获取字符串问题
我有两个页面
a.php
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php echo '1'; ?>
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> $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' }