$('#greatphoto').attr({
alt: 'Beijing Brush Seller',
title: 'photo by Kelly Clark'
});
2011年11月27日 星期日
2011年11月25日 星期五
array用法
$mealsArray=array();
$i=0;
do {
$mealsArray[i]=array();
$mealsArray[i]=$row_RecNews;
}while()
$i=0;
do {
$mealsArray[i]=array();
$mealsArray[i]=$row_RecNews;
}while()
left join式看看
SELECT data_set.* ,file_set.* FROM data_set LEFT JOIN file_set ON data_set.d_id = file_set.file_d_id WHERE data_set.d_class1 = 'news' GROUP BY data_set.d_id ORDER BY data_set.d_date DESC
2011年11月21日 星期一
上傳限制2M
修改php.ini文件
max_execution_time = 30000 ; Maximum execution time of each script, in seconds(30s)
max_input_time = 60000 ; Maximum amount of time each script may spend parsing request data(60s)
memory_limit = 1024M ; Maximum amount of memory a script may consume (8MB)
post_max_size = 1024M ; Maximum size of POST data that PHP will accept.(8MB)
upload_max_filesize = 1024M ; Maximum allowed size for uploaded files.(2MB)
max_execution_time = 30000 ; Maximum execution time of each script, in seconds(30s)
max_input_time = 60000 ; Maximum amount of time each script may spend parsing request data(60s)
memory_limit = 1024M ; Maximum amount of memory a script may consume (8MB)
post_max_size = 1024M ; Maximum size of POST data that PHP will accept.(8MB)
upload_max_filesize = 1024M ; Maximum allowed size for uploaded files.(2MB)
phpmyadmin改cookie
1.去C:\wamp\Apache2\conf\alias找phpmyadmin.conf
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
#一定要照上面改不然會不能啟動apache
2.C:\wamp\phpmyadmin找config.inc.php
改成這樣
$cfg['blowfish_secret'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
#一定要照上面改不然會不能啟動apache
2.C:\wamp\phpmyadmin找config.inc.php
改成這樣
$cfg['blowfish_secret'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
2011年11月9日 星期三
篩選文章分類並POST出該分類所有文章
//取得最新10篇並且依照分類名稱篩選 Get the last 10 posts in the special_cat category.
<?php query_posts('category_name=special_cat&posts_per_page=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Do special_cat stuff... –>
<?php endwhile;?>
來源:
http://codex.wordpress.org/The_Loop
<?php query_posts('category_name=special_cat&posts_per_page=10'); ?>
<?php while (have_posts()) : the_post(); ?>
<!-- Do special_cat stuff... –>
<?php endwhile;?>
來源:
http://codex.wordpress.org/The_Loop
出現特色圖片
有時裝上某些 theme 會有 "設定特色圖片" (thumbnail) 但有些沒有...
在 主題編輯器下 (theme editor) 的 function.php 中加入下列一行 PHP 指令, 即會跑出 "設定特色圖片" 選項了!
add_theme_support('post-thumbnails');
使用方式
在使用頁面上
<?php the_post_thumbnail('featured-small'); ?>
來源
http://yinung2.blogspot.com/2010/12/wordpress_15.html
在 主題編輯器下 (theme editor) 的 function.php 中加入下列一行 PHP 指令, 即會跑出 "設定特色圖片" 選項了!
add_theme_support('post-thumbnails');
使用方式
在使用頁面上
<?php the_post_thumbnail('featured-small'); ?>
來源
http://yinung2.blogspot.com/2010/12/wordpress_15.html
訂閱:
文章 (Atom)