<?php function param_post($a, $b = null) { echo "{$a}, {$b}"; } function param_get($a, $b = null) { echo "{$a}, {$b}"; } function param_request($a, $b = null) { echo "{$a}, {$b}"; } class Param { } param_post(array('post1' => Param::STRING, 'post2' => Param::STRING)); param_get(array('get1' => Param::STRING, 'get2' => Param::STRING)); param_request(array('req1' => Param::STRING, 'req2' => Param::STRING), 'param_'); echo $post_post1; echo $get_get1; echo $param_req1; //ERROR: undefined variable echo $post_foo; //ERROR: undefined variable echo $get_post1; //ERROR: undefined variable echo $get_req1;
* * ********END LICENSE BLOCK*********/ // Facebook Copyright 2006 - 2008 include_once $_SERVER['PHP_ROOT'] . '/lib/core/init.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/api/application.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/networking.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/privacy/platform.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/utils/strings.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/http.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/api/fetch.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/fql/includes.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/fbml/wrapper.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/fbml/flavors/canvas_page_flavor.php'; include_once $_SERVER['PHP_ROOT'] . '/lib/fbml/implementation/css.php'; param_get(array('fb_app_name' => $PARAM_STRING, 'fb_url_suffix' => $PARAM_STRING, 'fb_api_key' => $PARAM_STRING, 'fb_user_id' => $PARAM_INT, 'fb_force_mode' => $PARAM_STRING)); // FBOPEN:NOTE : html/canvas.php is a simple demonstration of canvas-like // : functionality, and will vary widely on your system. // : You can try this demo by putting this under your document root and // : sending a request to: // : yourapp.demo/canvas.php?fb_app_name=AAAA&fb_user_id=UUUU&fb_url_suffix=SSSSS // : where AAAA is your app's "display" name (apps.facebook.com/AAAA), // : UUUU is the 'logged in' user id, // : and fb_url_suffix is a URL-encoded string of the parameters // : you wish to send to your callback URL. $rel_canvas_url = $_SERVER['REQUEST_URI']; $url_suffix = urldecode($get_fb_url_suffix); if ($get_fb_app_name) { $app_id = application_get_fbframe_id($get_fb_app_name); } else { if ($get_fb_api_key) {
<?php require_once 'lib.php'; header_print('家ログ 検索', array()); $name = 'keyword'; $keyword = param_get($name); ?> <form method="POST" action="search.php"> <label for="address1">都道府県:</label><input type="text" name="address1" id="address1" value="" /><br/> <label for="address2">市町村:</label><input type="text" name="address1" id="address1" value="" /><br/> <label for="pay_type">種別:</label><select id="pay_type"><option>賃貸・売買</option><option>賃貸</option><option>売買</option></select><br/> <label for="age">築年数:</label><input type="text" name="age" id="age" value="" /><br/> <label for="keyword">キーワード:</label><input type="text" name="keyword" id="keyword" value="" /><br/> <input type="submit" value="送信" /> </form> <?php if (!empty($keyword)) { echo '○件がマッチしました.'; } footer_print();
<?php require_once 'lib.php'; header_print('家ログ 詳細', array()); $id = param_get('id'); if (empty($id)) { echo 'ERROR: wrong page transition!!'; footer_print(); die; } ?> <div id="tabmenu"> <div id="tab"> <a href="#tab1">詳細情報</a> <a href="#tab2">写真</a> <a href="#tab3">口コミ</a> </div> <div id="tab_contents"> <ul> <!-- 詳細情報 --> <li id="tab1" name="tab1"> <h2>詳細情報</h2> <div class="detail_photo"> <?php $owner = "images/owner{$id}.png"; $appear = "images/appear{$id}.png"; echo "<h3>概観</h3>\n"; echo "<img alt=\"{$appear}\" src=\"{$appear}\" width=\"250px\" />\n"; echo "<h3>オーナー</h3>\n"; echo "<img alt=\"{$owner}\" src=\"{$owner}\" width=\"250px\" />\n";