dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: can any one tell me how to display my posted image in php ( exact source )

  1. #1
    Join Date
    Oct 2013
    Posts
    1

    Question can any one tell me how to display my posted image in php ( exact source )

    can any one tell me how to display my posted image in php ( exact source ).
    how my posted image will be displayed in php? can i get the code ? please somebody help me.....

  2. #2
    Join Date
    Sep 2013
    Posts
    221
    Try out with the below example code:

    <html>
    <?php
    $dir = $_GET["input"];
    $img = imagecreatefrompng("./$dir/subdir/images/sample.png");
    ?>
    <body>
    <img src="???" alt="sample image" />
    </body>
    </html>

    If only one image:

    <img src="<?= $img ?>" alt="sample image" />

    If loads of images, use an array.
    I have an image in each directory at ./$dir/subdir/images/sample.png

    Hope this helps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles