当前位置: 首页>>代码示例>>PHP>>正文


PHP REST::setHTML方法代码示例

本文整理汇总了PHP中REST::setHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP REST::setHTML方法的具体用法?PHP REST::setHTML怎么用?PHP REST::setHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在REST的用法示例。


在下文中一共展示了REST::setHTML方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License. You may obtain
 * a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * $Id$
 **************************************************************************/
require_once dirname(__FILE__) . '/REST/REST.php';
REST::handle_method_spoofing();
REST::setHTML(array('Topos', 'html_start'), array('Topos', 'html_end'));
#require_once('rest.php');
#$debug = fopen(dirname(__FILE__) . '/debug.txt', 'a');
#fwrite($debug, "\n\n" . var_export($_SERVER, true));
#fclose($debug);
//session_name('aanwezigheidsbord');
//session_set_cookie_params( 0, dirname($_SERVER['SCRIPT_NAME']) );
//session_start();
date_default_timezone_set('Europe/Amsterdam');
function sara_exception_handler(Exception $e)
{
    REST::fatal(REST::HTTP_INTERNAL_SERVER_ERROR, '<pre id="message">' . $e->getMessage() . "</pre>\n<pre>" . $e->getTraceAsString() . '</pre>');
}
set_exception_handler('sara_exception_handler');
// Parse the PATH_INFO string, if present:
/**
开发者ID:CatchPlus,项目名称:CATCHPlus-Handle-Service,代码行数:31,代码来源:global.php

示例2: set_include_path

 * a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * $Id: global.php 2459 2009-08-10 21:20:41Z pieterb $
 **************************************************************************/
/**
 * File documentation.
 * @todo - The call register_shutdown_function at the end of this document
 * doesn't look too good.
 * @package Portal
 */
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__));
require_once 'REST/REST.php';
REST::handle_method_spoofing();
REST::setHTML(array('Portal', 'html_start'), array('Portal', 'html_end'));
require_once 'portal.php';
require_once 'portal_db.php';
require_once 'portal_mysql.php';
require_once 'portal_user.php';
//register_shutdown_function(
//  array('Portal', 'recordRequest'),
//  ( !empty($_SERVER['HTTPS']) ? 'https://' : 'http://' ) .
//    $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] .
//    $_SERVER['REQUEST_URI'],
//    $_SERVER['REMOTE_ADDR']
//);
开发者ID:CatchPlus,项目名称:CATCHPlus-Handle-Service,代码行数:31,代码来源:global.php

示例3: set_include_path

 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License. You may obtain
 * a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 **************************************************************************/
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__));
// REST stuff:
require_once 'REST/REST.php';
REST::handle_method_spoofing();
REST::setHTML(array('CP', 'html_start'), array('CP', 'html_end'));
//$debug = fopen(dirname(__FILE__) . '/debug.txt', 'a');
//fwrite($debug, "\n\n" . var_export(array($_SERVER, $_POST, $_GET), true));
//fclose($debug);
//session_name('aanwezigheidsbord');
//session_set_cookie_params( 0, dirname($_SERVER['SCRIPT_NAME']) );
//session_start();
date_default_timezone_set('Europe/Amsterdam');
function sara_exception_handler(Exception $e)
{
    REST::fatal(REST::HTTP_INTERNAL_SERVER_ERROR, '<pre id="message">' . $e->getMessage() . "</pre>\n<pre>" . $e->getTraceAsString() . '</pre>');
}
set_exception_handler('sara_exception_handler');
require_once 'cp_passwd.php';
require_once 'cp_mysql.php';
require_once 'cp.php';
开发者ID:CatchPlus,项目名称:CATCHPlus-Handle-Service,代码行数:31,代码来源:global.php


注:本文中的REST::setHTML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。