php 类的编写
发布网友
发布时间:2022-12-27 23:13
我来回答
共2个回答
热心网友
时间:2023-09-21 15:40
class Home_SupplierController extends Zend_Controller_Action {
/**
* 供应商库首页
*/
public function indexAction()
{
//读取行政区域并传入模板
$xzqy = require_once("../application/date/xzqy.php");
$this->view->assign('xzqy', $xzqy );
//读取行业类型
$gmjjhyfl = require_once("../application/date/gmjjhyfl.php");
$this->view->assign('gmjjhyfl', $gmjjhyfl );
//取出最新加入的供应商
$supplier = new Supplier();
$new_supplier = $supplier->getNewSupplier();
$this->view->assign('new_supplier', $new_supplier);
// print_r($new_supplier);
}
}
热心网友
时间:2023-09-21 15:41
class test{
public $testString = "test";
public function getTestString(){
return $this->testString;
}
}
$a = new test();
echo $a->getTestString();