내 public_html 디렉토리의 디렉토리 이미지에서 내 이미지를 표시하는 데 도움이 필요합니다. 업로드되었지만 아래의 PHP 스크립트를 실행해도 나타나지 않습니다. 그 이유를 아는 사람이 있습니까?디렉토리에서 이미지를 표시합니다.
<?php
include_once("connect.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM authors") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array($data))
{
Echo "<img src=http://giveaway.comli.com/public_html/images/".$info['photo']."> <br>";
Echo "<b>Name:</b> ".$info['name'] . "<br> ";
Echo "<b>Title:</b> ".$info['title'] . " <br>";
Echo "<b>Phone:</b> ".$info['description'] . " <br>";
Echo "<b><a href=".$info['url'] . ">Link</a><br>";
Echo "<b>Country:</b> ".$info['country'] . " <hr>";
}
?>
</body>
</html>
당신이 맞아요 .. 해당 폴더 .. HTTP의 사진을 볼 수 있습니다 : // giveaway.comli.com/images/ – SERPRO
이것으로도 작업하지 않습니다 : ( – Kelvin
@Kelvin'$ info [ 'photo']'는 당신이 기대하는 것이 아닙니다. http : // giveaway.comli.com/images/LS_The % 20Beginning.jpg'이므로'/ images' 뒤에 올바른 파일 이름을 제공해야합니다. –