-1

I define site url with this code,

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

And I want to use this variable this code in index.php;

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

But, this code appear status bar of the web browser..

"<?=$siteHTTPURL?>/folder1/test.php"

Why, "<?=$siteHTTPURL?>" code is not show "http://www.example.com" value ?

Sorry My bad English?

Yavuz
  • 15
  • 1
  • 2

1 Answers1

1

As Michael stated in the comments, check to see if you have short tags enabled.

Alternate syntax:

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

or

echo '<a href="' . $siteHTTPURL . '/folder1/test.php">Test >></a>';
sachleen
  • 30,730
  • 8
  • 78
  • 73