如何添加当前会话id与链接/下载链接


How to add current session id with link/download link?

我不确定,但如何简单地添加当前会话id与链接/下载链接?

<?php if($images) { $i=0; for ($index = 0; $index < count($images); $index++){ $i++ ?>
<a href="<?php echo $images[$index]; ?>">Download</a><br/> 
<?php }}?>

例如:

<?php if($images) { $i=0; for ($index = 0; $index < count($images); $index++){ $i++ ?>
<a href="<?php echo $images[$index] . '?PHPSESSID=' . session_id(); ?>">Download</a><br/> 
<?php }}?>