2012-03-01 13 views
-3

私は動的にフォルダを作成していますが、そのフォルダのサムネイルも表示したいと思います。ここで動的フォルダとそのサムネイルをPHPを使って作成

は私のindex.phpです:今ここに

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<title>Untitled Document</title> 
</head> 

<body> 
<div id="pictures"> 
<form id="pic_form" method="post" action="pictures.php"> 
<table align="center" width="500" cellpadding="0" cellspacing="0" border="0"> 
    <tr> 
    <td width="50px" align="center"/> 
    <td width="100px" align="center">Folder Name:: 
    <td> 
    <td width="50px" align="center"/> 
    <td width="100px" align="center"> 
    <input type="text" id="foldername" name="foldername"> 
    <td> 
    <td width="50px" align="center"/> 
    <td width="100px" align="center"> 
    <input type="submit" name="submit" value="Create"> 
    <td> 
    <td width="50px" align="center"/> 
    </tr> 
</table> 
</form> 
</div> 
</body> 
</html> 

は私pictures.phpです:

<?php 
$foldername=$_POST['foldername']; 
mkdir("album/$foldername"); 
//now what to do to generate thumbnail of the folder in the body segment; 
//my concept ends here; 
?> 
<html> 
<head> 
</head> 
<body> 
</body> 
</html> 
+2

質問は...?そのサムネイルはどこから来るのですか? – deceze

+0

なぜ私はそれを聞いたのですか?サムネイルの生成方法を教えてください。 – Saswat

+0

フォルダのサムネイルは何ですか? –

答えて

1
<img src="folder.gif"> <?php echo $_POST['foldername']; ?> 

どこからか、フォルダアイコンを取得し、それを表示するには<img>要素を使用します。結果は次のようになります。

enter image description here foobarに

+0

仲間、仲間.....そのことは私の評判のいくつかを要した.... – Saswat

関連する問題