0
我收到以下错误,我询问是否有人知道我为什么会得到这些错误的可能原因。我是新手,所以帮助将不胜感激... 我也将张贴有问题的路线。缺少参数和未定义的变量;错误的原因是什么?
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for Welcome::quote()
Filename: controllers/welcome.php
Line Number: 64
和
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: productid
Filename: controllers/welcome.php
Line Number: 65
在考虑中的线;
64 function quote($productid){
65 if ($productid > 0){
66 $fullproduct = $this->MProducts->getProduct($productid);
67 $this->MQuotes->updateQuote($productid,$fullproduct);
68 redirect('welcome/product/'.$productid, 'refresh');
69 }else{
70 $data['title'] = '... | Quote';
..
.. if (count($_SESSION['quote']) == true){
.. $data['main'] = 'quote';
.. $data['navlist'] = $this->MCats->getCategoriesNav();
.. $this->load->vars($data);
.. $this->load->view('template');
.. }else{
.. redirect('welcome/index','refresh');
.. }
.. }
.. }
$ productid有什么问题?
这可能不是函数的问题,但你是如何调用它的。 –