Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Php变量?_Php - Fatal编程技术网

使用Php变量?

使用Php变量?,php,Php,我用这个代码定义站点url $siteHTTPURL=”http://www.example.com"; 我想在index.php的代码中使用这个变量 但是,此代码显示在web浏览器的状态栏中 “/folder1/test.php” 为什么,“代码不显示”http://www.example.com“value 对不起,我的英语不好?正如Michael在评论中所说的,检查是否启用了短标记 替代语法: <a href="<?php echo $siteHTTPURL; ?>/f

我用这个代码定义站点url

$siteHTTPURL=”http://www.example.com";

我想在index.php的代码中使用这个变量

但是,此代码显示在web浏览器的状态栏中

“/folder1/test.php”

为什么,
代码不显示
”http://www.example.com“
value


对不起,我的英语不好?

正如Michael在评论中所说的,检查是否启用了短标记

替代语法:

<a href="<?php echo $siteHTTPURL; ?>/folder1/test.php">Test >></a>

echo';

您没有启用
short\u open\u标签。及
echo '<a href="' . $siteHTTPURL . '/folder1/test.php">Test >></a>';