0

Hi there
This is my problem:

- Upload image (not important)
- Store its in [filename].php
- Show [filename].php like image.jpg in show.php (gallery)

Can you solve? Thank you so much

3
Contributors
8
Replies
9
Views
6 Years
Discussion Span
Last Post by vukidrock
0
<?php
	
	
$files = glob("output/*.*");	
for ($i=0; $i<count($files); $i++)
{	
	$num = $files[$i];
	echo '<img style="display: inline;" alt="" class="" id="" rel="" src="'.htmlspecialchars($num).'" alt="random image" />';	
}


?>

I just know display image, sorry, I'm beginner

0

thank for your help!

can you help me any more?

in my problem, i have some image in Image Folder, i want display it as link.

For example: in webpage, images display of course, but when i save web, root folder saved. How does web saved, but image not saved, and display as just link.

0

form.php

<html>
<body>

<form action="uploader.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" /> 
<br />
<input type="submit" name="submit" value="Submit" />
</form>

</body>
</html>

uploader.php

<?php
echo "Party Symbol<br/>";
if($_FILES["file"]["name"])
  {
  echo $_FILES["file"]["name"];
  echo $_FILES["file"]["tmp_name"];
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "./images/" . $_FILES["file"]["name"]);
         echo "<img src='"."./images/" . $_FILES["file"]["name"]."' width='500px' height='500px' border='2'>";
      //now open database connection and save tha path ./images/$_FILES["file"]["name"]
 


   }

?>

Hope it will solve your problem.
PS-If Your problem is solved mark the thread as solved...

Edited by tomato.pgn: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.