当前位置: 首页>>代码示例>>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;未经允许,请勿转载。