Just take a note, maybe I will use it someday. My memeries do not always serve me, tha’s so sad, -_-!!
As we all know WordPress saves your drafts automatically, that leaves a lot of revisions as backups on the server. It’s good, who wouldn’t piss off if he typed for a long time and encountered some accidents like computer shut down for no reason. But on the other hand, when my articles posted, in most of the cases, I don’t need these revisions any more. Leaves them on the server as redundancy is useless and I guess they are adverse to the server’s performance. O.K., then things get really simple: KILL THEM ALL!
Try to access your WordPress database through some tools like phpMyAdmin(that’s the only tool I familiar with…), follow the steps below:
- Your database
- SQL
- type the following codes
DELETE FROM wp_posts WHERE post_type = "revision";
- then press the button “Go”
Job Done.
前两天碰到的问题,现在终于知道毛病出在哪里了,确实是自己没把HTML的各个标签吃透。
简单复述一下问题:希望实现一张2行的表格,其中第1行为2列。
错误html如下:
<table border=”0″>
<tbody>
<tr>
<td>111111111111111111111</td>
<td>111111111111111111111</td>
</tr>
<tr>222222222222222222222222222</tr>
<tr>333333333333333333333333333</tr>
</tbody></table>
效果如下:
| 111111111111111111111 |
111111111111111111111 |
222222222222222222222222222
333333333333333333333333333
正确的html应该这么写
<table border=”0″>
<tbody>
<tr>
<td>111111111111111111111</td>
<td>111111111111111111111</td>
</tr>
<tr>
<td colspan=2>222222222222222222222222222</td>
</tr>
<tr>
<td colspan=2>2333333333333333333333333333</td>
</tr>
</tbody></table>
关键在于少了粗体的红字部分代码。每个<tr>标签(表示一行)中必要内嵌<td>标签(表示一列),即使行内只有一列,但光这样是不够的,效果会变成这样:
| 111111111111111111111 |
111111111111111111111 |
| 222222222222222222222222222 |
| 2333333333333333333333333333 |
也就是说第二、第三行无论多长都会和第一行的第一列等宽。所以这里还需要加上colspan,这个是什么意思的呢?它规定单元格可横跨的列数,colspan=2即意味着单元格可横跨两列,现在全部代码补齐以后,表格就正常了。
| 111111111111111111111 |
111111111111111111111 |
| 222222222222222222222222222 |
| 2333333333333333333333333333 |
O.K. Well done~
p.s : 更多关于<colspan>的介绍请参见这里,w3school,一个很强大的web技术教程网站。
先看一段非常简单的代码,真的非常简单,懂一点皮毛的html即可
<table border=”0″>
<tbody>
<tr>
<td>111111111111111111111</td>
<td>111111111111111111111</td>
</tr>
<tr>222222222222222222222222222</tr>
<tr>333333333333333333333333333</tr>
</tbody></table>
我想实现的是一个三行的表格,其中第一行有两列。
但产生的实际效果如下所示:
| 111111111111111111111 |
111111111111111111111 |
222222222222222222222222222
333333333333333333333333333
看出毛病了吗?
- 第二、第三行没有分隔开。
- 第二、第三行跳到了第一行前面。
我觉得一定是哪里犯低级错误了,可是我还真没找出来。。
所以。。
求解!
Comments