18/11/2007
做自己最擅长的事情。
做熟不做生。
技术也要适应需求才行。
08/11/2007
一:首先确认3306远程端口开启。
二:mysql默认不支持远连.必须设置。
如下:
root权限进入
mysql -u root -p 密码
use mysql;
update db set host = '%' where user = '用户名';
FLUSH PRIVILEGES;
退出.然后重启mysql. 上面的那个用户即可远连你的mysql了.
记得为了安全一定要有个where条件。
三:host:%表示你的数据库接受任何一个IP的访问,而如果明确访问方机器的IP,可以设置host:访问方IP,所以在网络物理连接的前提下,限制是否能连接到你的数据库跟你自身的IP地址无关。
05/11/2007
/**default css style**/
html, address,
blockquote
,
body, dd, div,
dl, dt, fieldset, form,
frame, frameset,
h1, h2,
h3, h4,
h5, h6, noframes
,
ol, p, ul, center
,
dir, hr, menu, pre
{ display: block }
li {
display: list-item }
head {
display: none }
table { display:
table }
tr { display: table-
row }
thead { display: table-
header-group }
tbody { display
: table-row-group }
tfoot { display: table-footer-
group }
col { display: table
-column }
colgroup { display: table
-column-group }
td,
th { display: table-cell;
}
caption { display: table-
caption }
th { font-weight:
bolder; text-align: center }
caption { text-align: center }
body { margin: 8px; line
-height: 1.12 }
h1
{ font-size: 2em; margin
: .67em 0 }
h2
{ font-size: 1.5em;
margin: .75em 0 }
h3 { font-size: 1.17em
; margin: .83em 0 }
h4, p,
blockquote, ul
,
fieldset, form,
ol, dl
, dir,
menu { margin:
1.12em 0 }
h5 { font
-size: .83em; margin:
1.5em 0 }
h6 { font
-size: .75em; margin:
1.67em 0 }
h1,
h2, h3, h4,
h5,
h6, b,strong { font-
weight: bolder }
blockquote { margin-
left: 40px; margin-right
: 40px }
i, cite
, em,
var, address {
font-style: italic }
pre,
tt, code,
kbd, samp {
font-family: monospace }
pre {
white-space: pre }
button,
textarea,
input, object,
select { display:inline-block
; }
big { font-size
: 1.17em }
small,
sub, sup { font-size:
.83em }
sub { vertical
-align: sub }
sup
{ vertical-align: super
}
table { border-spacing:
2px; }
thead, tbody
,
tfoot { vertical-align: middle
}
td, th { vertical-align
: inherit }
s, strike,
del { text-decoration: line
-through }
hr { border:
1px inset }
ol, ul, dir
,
menu, dd { margin-left
: 40px }
ol { list
-style-type: decimal
}
ol ul, ul ol,
ul ul, ol ol
{ margin-top: 0; margin
-bottom: 0 }
u
, ins { text-decoration: underline
}
br:before { content:
"\A" }
:before,
:after { white-space:
pre-line }
center { text-
align: center }
abbr, acronym {
font-variant: small-caps;
letter-spacing: 0.1em }
:link, :visited {
text-decoration: underline }
:
focus { outline: thin dotted invert }
/* Begin bidirectionality settings (do not change) */
BDO[DIR="ltr"]
{ direction: ltr; unicode-bidi
: bidi-override }
BDO[
DIR="rtl"] { direction:
rtl; unicode-bidi: bidi-
override }
*[DIR="ltr"
] { direction: ltr; unicode
-bidi: embed }
*[DIR
="rtl"] { direction: rtl
; unicode-bidi: embed }
@media
print {
h1 { page-break
-before: always }
h1, h2
, h3,
h4, h5, h6 {
page-break-after: avoid
}
ul, ol, dl { page
-break-before: avoid }
}
从net2ftp 里面拔下来的
function sendDownloadHeaders($filename, $filesize) {
// --------------
// This function sends download headers to the browser
// --------------
// -------------------------------------------------------------------------
// Global variables
// -------------------------------------------------------------------------
global $net2ftp_globals;
// -------------------------------------------------------------------------
// Clean the input, and encode the filename with htmlentities
// -------------------------------------------------------------------------
$filename = trim($filename);
$filename_html = htmlEncode3($filename);
///htmlEncode3 就是使用 @htmlentities($string, ENT_QUOTES, "UTF-8");
// -------------------------------------------------------------------------
// Check which is the content type and disposition
// -------------------------------------------------------------------------
$content_type = getContentType($filename);
$content_disposition = "attachment";
if (strpos($filename, ".zip") !== false) { $content_disposition = "inline"; }
// -------------------------------------------------------------------------
// Send the headers - Internet Explorer
// From PhpMyAdmin
2.8.0.2 file export.php
// -------------------------------------------------------------------------
header("Content-Type: " . $content_type);
header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
if ($net2ftp_globals["browser_agent"] == "IE") {
header("Content-Disposition: $content_disposition; filename=\"" . $filename_html . "\"");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
}
else {
// Firefox needs an asterisk to enable filenames with special characters
header("Content-Disposition: $content_disposition; filename*=\"" . $filename_html . "\"");
header("Pragma: no-cache");
}
header("Content-Description: $filename_html");
header("Content-Length: $filesize");
header("Connection: close");
} // End function sendDownloadHeaders
Modified httpheaders.inc.php @ 166 to:
// Check which is the content type and disposition
// -------------------------------------------------------------------------
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename = ".basename($filename));
header("Content-Transfer-Encoding: binary");
readfile("$filename");
} // End function sendDownloadHeaders
在phpMyAdmin 2.11 版本 export.php
341 if (!empty
($content_encoding)) {
342 header('Content-Encoding: ' . $content_encoding);
343 }
344 header('Content-Type: ' . $mime_type);
345 header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
346 // lem9: Tested behavior of
347 // IE 5.50.4807.2300
348 // IE 6.0.2800.1106 (small glitch, asks twice when I click Open)
349 // IE 6.0.2900.2180
350 // Firefox 1.0.6
351 // in http and https
352 header('Content-Disposition: attachment; filename="' . $filename .
'"');
353 if (PMA_USR_BROWSER_AGENT == 'IE') {
354 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
355 header('Pragma: public');
356 } else {
357 header('Pragma: no-cache');
358 }
中文文件名 对于IE6 要用HttpServerUtility.UrlEncode() , Firefox 2 不需要。