本文整理汇总了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:
/**
示例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']
//);
示例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';