Open qazz-shyper opened 1 year ago
@changbin1997 RT, post.php的第77行: <a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" >编辑</a> 以及components/post-list.php的第57行: <a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" class="float-right mr-3 d-sm-none d-none d-md-inline d-lg-inline d-xl-inline">编辑</a>
<a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" >编辑</a>
<a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" class="float-right mr-3 d-sm-none d-none d-md-inline d-lg-inline d-xl-inline">编辑</a>
对应的链接地址是不是应该是'/admin/write-post.php?cid='?我发现每次点击这里都会出现跳转问题,还以为是我修改了代码。后来看了下源代码,应该是这里有问题。admin前添加"/"后就没有问题了,其他页面我还没仔细检查过
我测试了一下,文章列表的编辑链接是可以正常跳转到文章编辑页的:
我使用 Typecho 的网站地址 API $this->options->siteUrl 输出的地址结尾就包含 / ,admin 前面可以不需要加 / ,如果加了 / 域名后面就会包含两个 / 。
$this->options->siteUrl
/
admin
@changbin1997 RT, post.php的第77行:
<a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" >编辑</a>
以及components/post-list.php的第57行:<a href="<?php echo $this->options->siteUrl . 'admin/write-post.php?cid=' . $this->cid; ?>" class="float-right mr-3 d-sm-none d-none d-md-inline d-lg-inline d-xl-inline">编辑</a>
对应的链接地址是不是应该是'/admin/write-post.php?cid='?我发现每次点击这里都会出现跳转问题,还以为是我修改了代码。后来看了下源代码,应该是这里有问题。admin前添加"/"后就没有问题了,其他页面我还没仔细检查过