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
http://www.ibm.com/developerworks/jp/opensource/library/itm-zend3/ |
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
// 配列で定義 | |
define('HOGE', serialize(array('index1', 'index2', 'index3'))); | |
// 配列で取得 | |
$piyo= unserialize(HOGE); | |
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
// ▼ビュー | |
{{foreach from=$transitive_weather item=filename}} | |
<img border="0" src="{{$filename}}"> | |
{{/foreach}} | |
// ▼コントローラー | |
$transitive_weather = array( | |
'transitive_weather_1.gif', | |
'transitive_weather_2.gif', | |
'transitive_weather_3.gif' |
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
var form = $('<form></form>',{action:'./receiver.php',target:'receiver',method:'POST'}).hide(); | |
var body = $('body'); | |
body.append(form); | |
form.append($('<input>',{type:'hidden',name:'param1',value:'value1'})); | |
form.append($('<input>',{type:'hidden',name:'param2',value:'value2'})); | |
form.append($('<input>',{type:'hidden',name:'param3',value:'value3'})); | |
window.open('about:blank' | |
,'receiver' | |
,'menubar=no,toolbar=no,location=no,status=no,resizable=yes'); | |
form.submit(); |
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
<SCRIPT type="text/javascript"> | |
$(document).ready(function(){ | |
$('.ttl a[href*=#]').click(function() { | |
var anc = $(this).attr('href'); | |
var myRe = /\d/; | |
anc = myRe.exec(anc); | |
alert("{{$baseUrl}}/コントローラー/アクション/パラメータキー/" + anc + "/"); | |
}); |
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
要素については先祖、親子、兄弟という階層が存在します。 | |
1 | |
<div> | |
2 | |
<ul> | |
3 | |
<li>兄</li> | |
4 | |
<li>この要素から見て....ul要素は親、div要素は先祖</li> | |
5 |
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
// アンカータグのhref=#始まりを対象 | |
$('a[href*=#]').click(function() { | |
var anc = $(this).attr('href'); | |
}); |
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
{foreach from=$smarty.post|smarty:nodefaults key="key" item="item"} | |
{if is_array($item)} | |
{foreach from=$item key="key2" item="item2"} | |
<input type="hidden" name="{$key}[{$key2}]" value="{$item2}" /> | |
{/foreach} | |
{else} | |
<input type="hidden" name="{$key}" value="{$item}" /> | |
{/if} | |
{/foreach} |
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
$(this).attr("id"); |
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 ParentClass { | |
protected $instanceField = 0; | |
public function __construct($instanceField) { | |
print('ParentClass:Construct</br>'); | |
$this->instanceField = $instanceField; | |
} | |
NewerOlder