當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Content::content方法代碼示例

本文整理匯總了PHP中Content::content方法的典型用法代碼示例。如果您正苦於以下問題:PHP Content::content方法的具體用法?PHP Content::content怎麽用?PHP Content::content使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Content的用法示例。


在下文中一共展示了Content::content方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Content

<?php

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
require '../includes/classes/class.content.php';
//create the connection object
$conn = new Content("db545467511.db.1and1.com", "dbo545467511", "Rage2167_robert", "db545467511");
//query the database and pull the results
//select everything from the information table
echo $results = $conn->content("SELECT * FROM settings");
$conn->close();
開發者ID:DoggersHusky,項目名稱:beta,代碼行數:11,代碼來源:getSettings.php

示例2: prepend

 public static function prepend($x)
 {
     self::$content = $x . self::$content;
 }
開發者ID:robbiet480,項目名稱:hRepo,代碼行數:4,代碼來源:content.php

示例3: Content

<?php

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
require 'includes/classes/class.content.php';
//create the connection object
$conn = new Content("db545467511.db.1and1.com", "dbo545467511", "Rage2167_robert", "db545467511");
//query the database and pull the results
//select everything from the information table
echo $results = $conn->content("SELECT * FROM pages ORDER BY position");
開發者ID:DoggersHusky,項目名稱:ICOM3010_JSonProject,代碼行數:10,代碼來源:test+2+-+menu.php

示例4: htmlspecialchars

<?php

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
require 'includes/classes/class.content.php';
$page = htmlspecialchars($_GET['page'], ENT_QUOTES);
$id = htmlspecialchars($_GET['id'], ENT_QUOTES);
//create the connection object
$conn = new Content("db545467511.db.1and1.com", "dbo545467511", "Rage2167_robert", "db545467511");
if (isset($_GET['page']) and $page == "index") {
    //this is the index page will be used to show recent examples
    echo $conn->content("SELECT * FROM information WHERE display<>1 ORDER BY ID DESC");
} else {
    if (isset($_GET['id'])) {
        //query the database and pull the results
        //select everything from the information table
        echo $conn->content("SELECT * FROM information WHERE ID={$id}");
    } else {
        if (isset($_GET['page'])) {
            //query the database and pull the results
            //select everything from the information table
            echo $conn->content("SELECT * FROM information WHERE page='{$page}' ORDER BY ID DESC");
        } else {
            //query the database and pull the results
            //select everything from the information table
            echo $conn->content("SELECT ID, contentTitle FROM information ORDER BY ID DESC");
        }
    }
}
$conn->close();
開發者ID:DoggersHusky,項目名稱:beta,代碼行數:30,代碼來源:test+1+-+script.php

示例5: Content

<?php

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
//require the content building class
require '../includes/classes/class.content.php';
//create the connection object
$conn = new Content("db545467511.db.1and1.com", "dbo545467511", "Rage2167_robert", "db545467511");
//select all from Carousel and convert to json
echo $conn->content("SELECT * FROM carousel ORDER BY ID");
//close the connection
$conn->close();
開發者ID:DoggersHusky,項目名稱:beta,代碼行數:12,代碼來源:getCarousel.php


注:本文中的Content::content方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。