Home  >  Article  >  CMS Tutorial  >  What should I do if dedecms cannot obtain the article path using [field:arcurl/]?

What should I do if dedecms cannot obtain the article path using [field:arcurl/]?

藏色散人
藏色散人Original
2019-12-17 10:18:021823browse

What should I do if dedecms cannot obtain the article path using [field:arcurl/]?

dedecms What should I do if I cannot get the article path using [field:arcurl/]?

dedecms uses [field:arcurl/] to solve the problem of being unable to obtain the article path

Recommended learning: Dreamweavercms

{dede:sql sql='Select * from dede_shop where id=6 limit 26'}
<li>
<a href=&#39;[field:arcurl/]&#39; target="_blank">[field:title function=&#39;cn_substr(@me,20)&#39;/]</a>
</li>
{/dede:sql}

sql The reason why [field:arcurl/] in the statement cannot obtain the address is that arcurl is not a physical table, so the sql tag cannot obtain the static address of the article directly through arcurl.

You can use the following code:

[field:id runphp=&#39;yes&#39;]
$id=@me;@me=&#39;&#39;;
$url=GetOneArchive($id);
@me=$url[&#39;arcurl&#39;];
[/field:id]

However, if the id is invalid, the output will be empty, so you need to check aid.

The above is the detailed content of What should I do if dedecms cannot obtain the article path using [field:arcurl/]?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn