需要修改的文件是phpcms\modules\content\fields\downfiles\output.inc.php
找到
$list_str[] = "<a href='".APP_PATH."index.php?m=content&c=down&a_k={$a_k}' target='_blank'>{$filename}</a>";
} else {
$list_str[] = "<a href='{$_v[fileurl]}' target='_blank'>{$filename}</a>";
复制代码
其中
$list_str[] = "<a href='".APP_PATH."index.php?m=content&c=down&a_k={$a_k}' target='_blank'>{$filename}</a>";
复制代码
是显示本地下载地址的代码,else之后是显示远程附件的代码,如果希望获得纯url地址的话,只需将以上代码修改为:
$list_str[] = ".APP_PATH."index.php?m=content&c=down&a_k={$a_k}";
} else {
$list_str[] = "{$_v[fileurl]}";
复制代码
即可,前台使用
{loop $downfiles $r}
{$r}
{/loop}
复制代码
即可调用纯url了!