-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?

2

1 Answer 1

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>';
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.