jjzjj

threadbits_forum

全部标签

ruby - 我如何在 Nokogiri 中使用 XPath?

我还没有找到任何文档或教程。有没有这样的东西?doc.xpath('//table/tbody[@id="threadbits_forum_251"]/tr')上面的代码将在任何地方为我提供任何表,它有一个tbody子级,其属性id等于“threadbits_forum_251”。但是为什么要以双//开头呢?为什么最后会有/tr?有关详细信息,请参阅“RubyNokogiriParsingHTMLtableII”。谁能告诉我如何提取href、id、alt、src等,使用野切?td[3]/div[1]/a/text()'如何提取其他东西? 最佳答案

php - 数据库设计: best practice for designing a forum table

关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭2年前。Improvethisquestion不知道在设计论坛的时候有没有什么实践。我想设计几个论坛。是的,至少有两种不同类型的论坛。一个供选择性成员使用,另一个对所有公共(public)成员开放。在论坛中,成员(member)可以发起话题,其他成员(member)可以回复。所以我对这类论坛的结构有一个大概的想法。我将论坛表命名为“字符串”表。这是我能想到的结构,str_idfortheautoincrementidstr_tilte

php - 拉维尔 5 : allow user to edit post if he's the owner of the post or the owner of the forum category

到目前为止,我能够允许用户编辑他自己的帖子,但每当我通过ifhe'sownerofthesubreddit/category条件时,它就会完全停止工作。我有这3张tableUsers:id,name,email...Subreddits:id,name,user_id...Posts:id,link,title,user_id,subreddit_id...这是PostsController.php中的edit()方法publicfunctionedit(Post$post,Subreddit$subreddit){if(Auth::id()!==$post->user_id){ret