stutrip 发表于 2009-9-29 15:27:49

我表单提交。这是报什么错呢?

An Error Was Encountered
Unable to load the requested file: helpers/from_helper.php

yinzhili 发表于 2009-9-29 16:09:26

单词拼写,是form而不是from,请检查一下你代码里面有没有拼错。

stutrip 发表于 2009-9-29 16:14:59

谢谢!!太感谢了

stutrip 发表于 2009-9-29 16:18:14

function contactus(){
$this->load->helper('url');
$this->load->model('MContacts','',TRUE);
$this->Mcontacts->addContact();
redirect('welcome/thankyou','refresh');
}
调用这个函数为什么报错呢?

stutrip 发表于 2009-9-29 16:21:03

http://www.ibm.com/developerworks/cn/web/wa-codeigniter/
我 就按着这个例子做的就不行,我郁闷一天了。也不知道哪里错!!那位大师帮帮忙:'(

yinzhili 发表于 2009-9-29 16:21:18

你这个redirect函数是写在哪里的 ?

Hex 发表于 2009-9-29 17:25:51

报什么错要贴出来呀,呵呵

stutrip 发表于 2009-9-29 17:35:25

redirect()这个函数我没有写,我把表单提交后数据库没有也跳不到 redirect('welcome/thankyou','refresh');thankyou这个函数来,要单运行welcome/thankyou没问题呀就是不执行
contactus().提交后就是网页报错??:L

yinzhili 发表于 2009-9-29 17:38:26

如果这个redirect函数不是你自己写的,那就是调用CI提供的了,要先加载URL辅助函数才行。检查一下你加载了URL辅助函数没有。

stutrip 发表于 2009-9-29 17:39:38

contactus() 函数是载入 MContacts 模型,运行该模型内的 addContact() 函数,然后将用户转向 thank-you 页面。请注意,要使用 redirect() 函数,必须载入 URL 帮助程序
redirect()要怎么写这个函数呢
页: [1] 2
查看完整版本: 我表单提交。这是报什么错呢?