Skip to content

Instantly share code, notes, and snippets.

@j100002ben
Forked from anonymous/gist:5552477
Last active December 17, 2015 04:59
Show Gist options
  • Save j100002ben/5554464 to your computer and use it in GitHub Desktop.
Save j100002ben/5554464 to your computer and use it in GitHub Desktop.
條件:
熟悉 php, mysql, javascript (jQuery)
瞭解基本的 html, css,
有 Facebook Api 開發經驗
有一年以上網頁開發經驗
有 linux, apache 管理經驗 (加分)
有 CodeIgniter 開發經驗 ( 加分 )
有 ajax 開發經驗 (jQuery)(加分)
-
1. 如果一個X元素內的子元素通通float: left,請問X元素本身會有什麼狀況?如果我要在X元素內下背景,卻沒有顯示,請問如何解決?
2. 為何<a>元素的寬度設置了width: 150px,但是寬卻沒有150px呢?
Google "Even Wu"
3. 我有一個最新消息功能的需求,前台顯示部份有列表以及內容頁
欄位部份需要:標題、摘要、完整內文、發表日期、是否上稿以及排序
請寫下資料表結構
CREATE TABLE `news_posts` (
`news_sn` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`news_title` varchar(255) NOT NULL,
`news_summary` longtext NOT NULL,
`news_content` longtext NOT NULL,
`news_created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`news_status` varchar(20) NOT NULL,
`news_order` bigint(20) NOT NULL,
PRIMARY KEY (`news_sn`),
KEY `news_list_key` (`news_status`, `news_order`, `news_created_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
4.請製作一個名為today()的函數,用來傳回當天的民國日期,需要包含星期幾
格式如下:民國102年05月05日 星期日
<?php
function today()
{
$week_index = array('日','一','二','三','四','五','六');
$past_year = '民國';
$year = date('Y') - 1911;
$month = date('m');
$day = date('d');
$week = $week_index[date('w')];
if( $year <= 0 ) {
$past_year = '民國前';
$year = $year * (-1) + 1;
}
return "{$past_year}{$year}年{$month}月{$day}日 星期{$week}";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment