thinkphp引用require和import老报错求解

浏览:4109 发布日期:2015/10/05 分类:求助交流 关键字: import require thinkphp 模板 thinkPHPcore
当前系统使用thinkphp core 本人刚学PHP做项目

多个系统 想在UI模板下面引用require问题老报错于是使用import('API.class.php'); 文件API.class.PHP放在library下面但是没有反应请问应该怎么处理 thinkPHP模板下面可以写法用 (下面代码有问题,只是请教thinkPHP能否在模板下面这样写PHP)

<?php

import('rAPI.class.php');

$API = new testAPI();

$API->debug = true;

if ($API->connect('www.baidu,com', 'admin',)) {

$API->write('/body/print',false);
$API->write('=stats=');

$READ = $API->read();
$ARRAY = $API->parse_response($READ);

print_r($ARRAY);

$API->disconnect();

}

?>
最佳答案
评论( 相关
后面还有条评论,点击查看>>