PHP文件中的超链接

PHP文件中的超链接,php,hyperlink,Php,Hyperlink,HTML文件中的链接: <a href="<?= Config::get('URL') . 'profile/showProfile/' . $user->user_id; ?>">Profile</a> 工作 PHP文件中的相同链接: echo "<a href='"<?= Config::get('URL') . 'profile/showProfile/' . $user->user_id; ?>"'>Profi

HTML文件中的链接:

<a href="<?= Config::get('URL') . 'profile/showProfile/' . $user->user_id; ?>">Profile</a>

工作

PHP文件中的相同链接:

echo "<a href='"<?= Config::get('URL') . 'profile/showProfile/' . $user->user_id; ?>"'>Profile</a>";
echo”“;
不行


我做错了什么?

您不需要包含
试试这个

$url = Config::get('URL');
echo "<a href='".$url. 'profile/showProfile/'.$user->user_id."'>Profile</a>";
$url=Config::get('url');
回声“;

您确定已启用短标记吗?更换
无问题配对。有时我们忽略了最简单的事情
$url = Config::get('URL');
echo "<a href='".$url. 'profile/showProfile/'.$user->user_id."'>Profile</a>";