This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>[use for()]</h3> | |
<?php | |
//配列を用意 | |
$moriken_p[0] = "moriken"; | |
$moriken_p[1] = "e-learning"; | |
$moriken_p[2] = "ganriser"; | |
$moriken_p[3] = "http://sakumon.jp/app"; | |
//配列の中身をforで取得 | |
$count = count($moriken_p); //配列の個数を取得 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gist id=7024241] | |
[gist]http://gist.github.com/7024241[/gist] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function find_plus_all($id){//グループとグループに属する試験 | |
$hasMany = array( | |
//試験テーブルと結合 | |
'AutoExam' => array( | |
'className' => 'AutoExam', | |
'foreignKey' => 'group_id', | |
'order' => array( | |
'name' => 'DESC', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<?php echo $_POST["hoge"]; ?> | |
ふくさかが課題おわんねーってよ | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HelloController extends AppController { | |
public $name = "Hello"; | |
//public $uses = null; | |
public $components = array('DebugKit.Toolbar'); //DebugKitの適用 | |
function index(){ | |
echo "aaaa"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#main { | |
width: 90%; } | |
#main p { | |
font-size: 14px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#main{ | |
width: 90%; | |
p{ | |
font-size: 14px; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#main { | |
width: 90%; | |
} | |
#main p { | |
font-size: 14px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// index.php | |
$link = mysql_connect('localhost', 'myuser', 'mypassword'); | |
mysql_select_db('blog_db', $link); | |
$result = mysql_query('SELECT id, title FROM post', $link); | |
?> |