PHP笔记【panbook】

来源:互联网 发布:finereport数据填报 编辑:程序博客网 时间:2024/05/03 12:38

<?php

$url = "http://yf-chunlei-rd02.yf01.baidu.com:8696/devsch/s?uid=bd_liushaoshuai110&req_type=0";

$file = fopen($url, "r");
if ($file === false ) {
        echo "file is false";
}
$tmp = fgets($file);
//echo $tmp;

$string = <<<XML
$tmp
XML;

echo "string:/n$string";

$xml = simplexml_load_string($string);

print_r($xml);
var_dump($xml);

echo $xml->reg;

if( $tmp === '1') {
        echo "恒等";
} elseif ( $tmp == 1) {
        echo "等于";
} else {
        echo "不等";
}

?>

 

 

 

 

二、关于==,不能传递==

 

'' == 0

'     '  == 0

'0'  == 0

'' != '0'

'    '  !=  '0'

原创粉丝点击