formヘルパーにendとsubmitのメソッドを発見。
<?php e($form->end(array('label'=>$html->url('/img/hoge.jpg')))); ?>
<?php e($form->submit($html->url('/img/hoge.jpg'),array('type'=>'submit'))); ?>
それぞれ、上記で表示されることを確認しました。
違いは、endメソッドで</form>が挿入されることでした。
日々の生活で忘れそうなことを書いていく
<?php e($form->end(array('label'=>$html->url('/img/hoge.jpg')))); ?>
<?php e($form->submit($html->url('/img/hoge.jpg'),array('type'=>'submit'))); ?>
Warning: realpath() [function.realpath]: SAFE MODE Restriction in effect.
The script whose uid is 10628 is not allowed to access /usr/local/lib/php
owned by uid 0 in /virtual/*******/public_html/default.mobaweb.net/cake/libs/configure.php
on line 459
if ( $path=='/usr/local/lib/php') continue;
<?php echo $html->textarea($fieldname,array('value'=>$html->tagValue($fieldname,true)));?>
$html->tagValue($fieldname,true)
<?php echo $html->css('common',NULL,NULL,false); ?>
<link rel="stylesheet" type="text/css" href="/css/common.css" />
$tmpfile = "/tmp/googlead.php";
$file = file_get_contents('http://pagead2.googlesyndication.com/pagead/show_ads.php');
$fp = fopen($tmpfile, "w");
fwrite($fp,$file);
fclose($fp);
$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='xxxxxxxxxx';
$GLOBALS['google']['client']='xxxxxxxxxx';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='xhtml';
$GLOBALS['google']['oe']='utf8';
$GLOBALS['google']['output']='xhtml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
require($tmpfile);
http://pagead2.googlesyndication.com/pagead/ads?
get_defined_constants()
HTML::Template->output() : fatal error in loop output : HTML::Template : Attempt to set nonexistent parameter
$template = HTML::Template->new('filename' => 'foo.tpl','die_on_bad_params' => 0);die_on_bad_params
TRUNCATE TABLE table_name
3.23 では、TRUNCATE TABLE は COMMIT; DELETE FROM table_name にマップされる。 See 項6.4.5. 「DELETE 構文」。
TRUNCATE TABLE は次の点で DELETE FROM ... と異なります。
*切り捨て操作では、テーブルが破棄され、再作成される。この操作は、レコードを 1 つずつ削除するよりはるかに迅速に処理される。
*切り捨て操作はトランザクションセーフではない。アクティブなトランザクションやアクティブなテーブルのロックがあると、エラーになる。
*削除されたレコード数は返されない。
*テーブル定義ファイル table_name.frm が有効である限り、データやインデックスのファイルが破損しても、この方法でテーブルを再作成できる。
TRUNCATE TABLE は Oracle の SQL 拡張です。 このステートメントは MySQL 3.23.28 で追加されました。ただし、3.23.28 〜 3.23.32 では、キーワード TABLE を省略する必要があります。
explode() の例
<?php
// 例 1
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2
?>
implode()の例
<?php
$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);
echo $comma_separated; // lastname,email,phone
?>