CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    214

    im not sure how to give a title to this

    so ill explain.........i have a variable

    Code:
    $picture = "/$registered/$member/$pic/default.jpg";
    i want to be able to have

    Code:
    $registered
    $member
    $pic
    to be equal to an md5 or something, that is, if u look at the source code, but still shows the picture....or more or less still equal to the path to the picture. any ideas ...thanks?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: im not sure how to give a title to this

    It seems that you are attempting to hide the path of an image. Is this the case?

    You can use whatever you want in PHP to output a path to an image. However, once it is in HTML, it will have to be the actual location of the image.

    If you are trying to mask the path, you can use a PHP file to read the image and then echo it. The following will show the file name, but the user will see the path to the PHP file and not the true image path.

    PHP Code:
    <?php
    header
    ('Content-type: image/jpeg');
    echo 
    file_get_contents('path/to/file/' $_GET['image']);
    ?>
    If I misunderstood your complete intention, please explain yourself a little more clearly.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Apr 2008
    Posts
    214

    Re: im not sure how to give a title to this

    cool thanks....thats exactly what i was looking for.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured