猿问

有关img src属性的书写规范

      <img  id="img" src="http://localhost/uc_server/avatar.php?uid=2&size=big" width="110px" height="160px" />
其中uid=2    其实是想给uid赋值为超全局变量$_SESSION的值,怎么在src属性中将uid=“超全局变量$_SESSION”的值

慕仔8661472
浏览 1770回答 1
1回答

逗你玩而已

<?php $directoryAsset = isset($_SESSION['what'])?'upload/customers/'.$_SESSION['what']:'';?>src="http://localhost/uc_server/avatar.php?uid=$directoryAsset&size=big"
随时随地看视频慕课网APP
我要回答