Results 1 to 2 of 2

Thread: How to rewrite this php file?

  1. #1
    Join Date
    Apr 2010

    How to rewrite this php file?


    I have a php page that creates an image, and another that takes that image and adds a few more things. The problem is that the second doesn't like the .php file extension, so I want to change it to .gif.

    Basically here's what I want:

    photo.php?type=person&id=1 => photo/person/1.gif

    But I don't want this applying to all my php pages.

  2. #2
    Join Date
    Sep 2010
    Are you changing the header content type to image/gif on the first script?

    That would be the first place to start, the second being that does the second script need to be separate? If you're writing OO code, could you not just extend the class for the additional modifications?

    If you're after changing the file type, I'm guessing that you'll probably need to look into URL re-writing (mod-rewrite on Apache)

    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