脚本宝典收集整理的这篇文章主要介绍了使用php在自定义内容中创建动态“阅读更多”链接,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
如果有一些东西可以添加到所见即所得中,我认为很好:
<span id='break1"></span>
我可以使用PHP或jquery或其他任何东西将你的代码转换为链接,然后使用htaccess文件来处理URL的其余部分.
我几乎没有关于如何处理这个的想法,所以任何信息,对此的想法将不胜感激.
<p>Lorem ipsum dolor sIT amet,consectetur adipiscing elit.</p> <a href="/SEO-title/2/">read more</a> <!-- PEople would not see this part until the 'read more' link was clicked. --> <!-- will open a new page NOT just hidden content --> <p>Duis scelerisque,in tempus ante tortor eget tortor. Donec eu consequat augue.</p>
<p><?PHP echo substr(CONTENT,255); ?></p> <?PHP if (strlen(CONTENT) > 255): ?> <a class="readmore">read more</a> <p class="more"><?PHP echo substr(CONTENT,256); ?></p> <?PHP endif; ?>
javascript看起来像这样,快速切换.
VAR $readmore = $('.readmore'); $readmore.bind('click',function(){ var $next = $(this).next('p'); $next[$next.is(':visible') ? 'hide' : 'show'](); });
以上是脚本宝典为你收集整理的使用php在自定义内容中创建动态“阅读更多”链接全部内容,希望文章能够帮你解决使用php在自定义内容中创建动态“阅读更多”链接所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。