14 lines
556 B
PHP
14 lines
556 B
PHP
|
<?php
|
||
|
function get_info($img) {
|
||
|
$txt = @file_get_contents("info/$img.info");
|
||
|
if (!$txt || $txt == '')
|
||
|
return 'No information available.';
|
||
|
|
||
|
//return preg_replace(array('/<(.*)>/', '/[(.*)]/'), array("<<a href='$1'>$1</a>>", "[<a href='$1'>$1</a>]"), $txt);
|
||
|
//$txt = preg_replace('/<(.*)>/', "<<a href='$1'>$1</a>>", $txt);
|
||
|
//$txt = preg_replace('/\[(.*)\]/', "[<a href='$1'>$1</a>]", $txt);
|
||
|
return preg_replace(array('/<(.*)>/', '/\[([^]]*)\]/'), array("<<a href='$1'>$1</a>>", "[<a href='$1'>$1</a>]"), $txt);
|
||
|
return $txt;
|
||
|
}
|
||
|
?>
|