나는이 질문으로 google을 샅샅이 뒤지고 많은 기사, 자습서, PHP 가이드 및 다른 사람들의 질문을 읽었다. 그러나 지금까지는 하나의 솔루션만으로는 작동하지 않았습니다. 나는 그것이 단순해야만한다는 것을 안다.PHP 변수를 iframe src로 사용하는 방법은 무엇입니까?
이 내 코드입니다 :
<?php
$random=array_rand("http://www.mentor-distribution.com/media/gmaster_header.mp4", "http://www.mentor-distribution.com/media/hs_freedom_chair.mp4");
?>
<html>
<body>
<iframe width="320" height="187" frameborder="0" src="<?php echo htmlspecialchars($random); ?>"></iframe>
</body>
</html>
그러나 그것이 요소 검사에 표시하는 방법이다 : 어떤 도움이 크게 감사합니다 Chrome's inspect element output
합니다.
http://php.net/manual/en/function.error-reporting.php –