Browse Source

show client-side filename

tags/v0.99.beta17
Ben Wiley Sittler bsittler 16 years ago
parent
commit
7f251a3e93
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      caca-php/examples/www/export.php

+ 2
- 1
caca-php/examples/www/export.php View File

@@ -25,6 +25,7 @@ $pixels = imagecreatetruecolor(256, 256);
$exports = caca_get_export_list();

$file = isset($_FILES['file']) ? $_FILES['file']['tmp_name'] : NULL;
$filename = isset($_FILES['file']) ? $_FILES['file']['name'] : NULL;
$format = isset($_REQUEST['format']) ? $_REQUEST['format'] : NULL;

if((! $format) || (! array_key_exists($format, $exports)))
@@ -110,7 +111,7 @@ if($file)
$cv = caca_create_canvas(0, 0);
if(caca_import_file($cv, $file, "") < 0)
{
die($argv[0] . ": `" . $file . "' has unknown format\n");
die("`" . htmlspecialchars($filename) . "' has unknown format\n");
}
}
else


Loading…
Cancel
Save