本文整理匯總了PHP中Home::recom方法的典型用法代碼示例。如果您正苦於以下問題:PHP Home::recom方法的具體用法?PHP Home::recom怎麽用?PHP Home::recom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Home
的用法示例。
在下文中一共展示了Home::recom方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/casarover/application/common/PropertyManager.php';
/***
* 首頁動態加載數據
*
***/
$c = $_GET['c'];
$route = new Home();
$route->recom('1');
class Home
{
private $db;
protected $host = 'localhost';
protected $dbname = 'casarover';
private $db_pwd;
public function __construct()
{
$dsn = "mysql:host=" . $this->host . ";dbname=" . $this->dbname;
$pro = new PropertyManager();
$this->host = $pro->getProperty('db_host');
$this->db_pwd = $pro->getProperty('db_pwd');
$this->db = new PDO($dsn, 'root', $this->db_pwd);
}
// 民宿推薦
//傳入城市的名稱
public function recom($city)
{
// $sql = "SELECT * `activity_` (`openid`, `phone`) VALUES (?, ?);";
// $pre = $this->db->prepare($sql);
// $pre->bindParam(1,$city);