大家好,想请教一个问题,
最近在学习怎么上传图档到网页上,
有段程式码无法理解。
<?php
...
/* define('GW_UPLOADPATH', 'images/')
$screenshot = $_FILES['screenshot']['name']*/
echo '<img src="' . GW_UPLOADPATH . $screenshot . '" alt="score image"/>;
...
?>
请问一下,
为什么img这里的程式码是
img src="' . GW_UPLOADPATH . $screenshot . '"
而不是
img src=" GW_UPLOADPATH . $screenshot "
img src=”…”是html的语法,
但不太懂GW_UPLOADPATH . $screenshot的前后加上句点与单引号的用意。
谢谢~