<?php
"$data_int1=123;"
echo $data_int1;
echo "<br />";
"$data_int2=-123;"
echo $data_int2;
echo "<br />";
"$data_int3=0123;"
echo $data_int3;
echo "<br />";
"$data_int4=0x123;"
echo $data_int4;
echo "<br />";
?>
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /54/746/IzPc/index.php on line 3
你的变量定义为什么有双引号括起来呢?把所有定义变量行的双引号去掉就可以了
<?php
$data_int1=123;
echo $data_int1;
echo "<br />";
$data_int2=-123;
echo $data_int2;
echo "<br />";
$data_int3=0123;
echo $data_int3;
echo "<br />";
$data_int4=0x123;
echo $data_int4;
echo "<br />";
?>
变量 不能使用 ""双引号,本机 修改后代码如下,已可以正常运行!
<?php
$data_int1=123;
echo $data_int1;
echo "<br />";
$data_int2=-123;
echo $data_int2;
echo "<br />";
$data_int3=0123;
echo $data_int3;
echo "<br />";
$data_int4=0x123;
echo $data_int4;
echo "<br />";
?>