我需要在当前表中添加一列.
这张桌子在白天和晚上都经常使用.我发现我需要使用此处找到的alter命令进行更改
http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
Run Code Online (Sandbox Code Playgroud)
我在开发服务器上测试了它.
我花了大约2个小时才完成.现在我想在生产服务器上执行此操作?
这会阻止我的网站吗?
我有很少的cronjob汇总数据和验证我的网站的数据.其中一些具有需要在后台运行的进程.
例:
cronjob1.php execute cronjob2.php using exec
Run Code Online (Sandbox Code Playgroud)
这个cronjob2.php运行另一个cronjob3.php使用exec和cronjob3需要完成然后cronjob2然后cronjob完成.
我目前有一个问题,cronjob1.php需要2个小时才能完成.
是否有更好的方法来运行它,以便它运行得更快?
谢谢
我的.htaccess中有规则用于页面,显示属性ID等...
我想确保我验证每个参数我得到的正确查询.
我有:
RewriteRule ^(.*)$ page.php?page=$1
RewriteRule ^property/(.*)$ property.php?pid=$1
Run Code Online (Sandbox Code Playgroud)
所以在我的PHP我做:
$page = $_GET['page'];
Run Code Online (Sandbox Code Playgroud)
和
$propertyid = $_GET['pid'];
Run Code Online (Sandbox Code Playgroud)
现在我需要保护它们,但我想知道哪种方法最适合用来保护它们,这就是我失去的地方.
我目前正在使用deflateApache配置缓存我的CSS,JS和图像.
这是我的代码:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
Run Code Online (Sandbox Code Playgroud)
现在,当我检查我的标题时,我看到:
Host www.domain.com
User-Agent Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip, deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection keep-alive
If-Modified-Since Fri, 30 Sep 2011 01:05:01 GMT
If-None-Match "124741af-1c4b9-4ae1136f3f9d0"
Cache-Control max-age=0
Run Code Online (Sandbox Code Playgroud)
一切看起来都不错,Accept-Encoding就是gzip, deflate这是我想要什么,但现在我看到的Cache-Control是max-age=0.
这会破坏使用deflate进行缓存的目的吗?这是否意味着它只缓存1天,第二天它不会缓存它或它将不得不重新加载它?
注意:我的图像很少改变,我的CSS和JS每周更改一次.