TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   adding a php link me code using an image as the link (http://www.talkphp.com/absolute-beginners/4013-adding-php-link-me-code-using-image-link.html)

chikooo 03-01-2009 05:38 PM

adding a php link me code using an image as the link
 
is there a way to make a link me code on php using an image as the link.
also if i put some images on a folder and then a php script will place them on the document and then a next link will appear to show the next image. and show the text box with the link me code

Village Idiot 03-02-2009 03:53 AM

So you want to run PHP on the extension of an image file? So when a user goes to image.jpg, they actually go to a script? There is no way with straight PHP to do this, your options are to MIME types to process the image extension you want as PHP, your other is to use mod_rewrite to run a PHP file for it.

Cappuccino 03-02-2009 02:18 PM

by mod_rewrite

RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ path_to_file.php

sketchMedia 03-02-2009 03:12 PM

or using forcetype:
Code:

<Filesmatch ".*\.(bmp|tif|gif|jpg|jpeg|jpe|png)">
  ForceType application/x-httpd-php
 </Filesmatch>



All times are GMT. The time now is 07:35 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0