Changeset 3207 for libcaca


Ignore:
Timestamp:
Nov 2, 2008, 5:56:48 PM (11 years ago)
Author:
bsittler
Message:

generate self-referencing script URI correctly, taking into account that the
script might be content-negotiated, renamed, symlinked, or otherwise
alised in URI-space.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/examples/www/render.php

    r3206 r3207  
    3939}
    4040else {
     41
     42$render_php = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : 'render.php';
     43
    4144?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    4245    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    5457
    5558<h1>Generated image:</h1>
    56 <a href="render.php?png=1"><img alt="[PNG]" src="render.php?png=1" border="0" /></a>
     59<a href="<?= htmlspecialchars($render_php) ?>?png=1"><img alt="[PNG]" src="<?= htmlspecialchars($render_php) ?>?png=1" border="0" /></a>
    5760</body>
    5861</html>
Note: See TracChangeset for help on using the changeset viewer.