PHP script as target of <a href="script here">?
| From: | Ken Tozier | Date: | Sun, 11 May 2003 08:38:05 +0000 |
| Subject: | PHP script as target of <a href="script here">? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-147191@lists.php.net to get a copy of this message | ||
I need to be able to have href links launch photoshop on a users machine and open the file referenced in the link. Is there a PHP mechanism that allows this sort of thing?
Basically, I'd like to embed function calls in anchor tags like so (unless there is a better way to do it)
echo "<a href=open_file_with_photoshop(\"path/to/photo/file.jpg\")>Click here to open file in Photoshop</a>";
I found the following sort of works...
echo "<a href=\"";
echo open_file_with_photoshop(\"path/to/photo/file.jpg\");
echo "\">";
... but photoshop is launched when the page loads (before the user gets a chance to click the link) Subsequently, the links open the specified files as expected but the cursor doesn't recognize them as a link even though the browser renders them as normal looking <a> tags.
Thanks for any help,
Ken