故需另外開啟後才能正常進入頁面。
// 需為伺服器使用者的身份有寫入權限
CHOWN nginx:nginx storage
// 開啟SELinux資料夾讀寫權限
chcon -r -t httpd_sys_rw_content_t storage
// 需為伺服器使用者的身份有寫入權限
CHOWN nginx:nginx storage
// 開啟SELinux資料夾讀寫權限
chcon -r -t httpd_sys_rw_content_t storage
systemctl restart php-fpm
[root@ip-QAQ ~]# systemctl | grep "fpm"
php70-php-fpm.service loaded active running The PHP FastCGI Process Manager
systemctl | grep "fpm" | awk '{print "systemctl restart " $1 | " bash "}'
<?php
$data = array (
'2016-11-02 14:30:00 Mary is a girl.',
'Hello 2016-11-14 14:30:00Mary.',
'Mark 2016-11-02 14:30:00is a boy ',
'Hello Mark'
);
$matches = array ();
foreach ($data as $str)
if (preg_match ('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/i', $str, $m))
$matches[] = $m[0];
var_dump($matches);
// 取出 test.csv 中符合 Email 格式的資料
的的grep -E -o“B [A-ZA-Z0-9 ._%+ - ] + @ [A-ZA-Z0-9 .-] + [A-ZA-Z] {2,6} B” test.csv
// 獨特
的的grep -E -o“B [A-ZA-Z0-9 ._%+ - ] + @ [A-ZA-Z0-9 .-] + [A-ZA-Z] {2,6} B” test.csv | 排序| uniq的的
<meta http-equiv="cache-control" content="no-cache">
//舊寫法,為了相容性添加。
<meta http-equiv="pragma" content="no-cache">
//設為立即過期。
<meta http-equiv="expires" content="0">
header("Expires: Mon, 26 Jul 1990 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
if (!is_numeric($_GET['_']) || $_GET['_'] < time()) {
$_GET['_'] = time();
header('location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']. '?' . http_build_query($_GET));
}
<!-- 此方式可以避免瀏覽器快取(時效為一天) -->
http://blog.dkstu.com{$smarty.now|date_format:"%Y%m%d"}
<?php
header("HTTP/1.1 301 Moved Permanently"); // 不使用此行即為暫時轉址{302}
header("Location: http://host.domain.tld/path/to/");
?>
<meta http-equiv=refresh content="0;url=http://dkstu.com/">
<script language="JavaScript">
window.location.href = "http://dkstu.com/";
</script>