我被卡住了,似乎无法解决我的问题。我正在尝试第一次使用 Codeigniter 编写一个基本的“联系我们表格”。我认为我的表格看起来像这样..
<div style='float: left; padding-right: 55px; padding-left: 35px;'>
<?php
$this->load->helper('form');
echo form_open('pages/emailsender'); ?>
Contact Us:<br />
<?php
echo form_input('name', 'Enter Your Name');
echo form_input('email', 'Enter Your Email');
echo "<br />";
echo form_textarea('message', 'Enter your message here, thanks for taking the time to contact us!');
echo "<br />";
echo form_submit('submit', 'Send Message!');
echo form_reset('reset', 'Reset Form');
echo form_close();
?>
</div>
我的控制器 pages.php 看起来像这样..
<?php
class Pages extends CI_Controller {
public function index(){
$this->load->view('templates/header');
$this->load->view('home');
$this->load->view('templates/footer');
}
public function home(){
$this->load->view('templates/header');
$this->load->view('home');
$this->load->view('templates/footer');
}
public function about(){
$this->load->view('templates/header');
$this->load->view('about');
$this->load->view('templates/footer');
}
public function services(){
$this->load->view('templates/header');
$this->load->view('services');
$this->load->view('templates/footer');
}
public function reviews(){
$this->load->view('templates/header');
$this->load->view('reviews');
$this->load->view('templates/footer');
}
public function specials(){
$this->load->view('templates/header');
$this->load->view('specials');
$this->load->view('templates/footer');
}
public function contact(){
$this->load->view('templates/header');
$this->load->view('contact');
$this->load->view('templates/footer');
}
public function emailsender(){
$this->load->view('templates/header');
$this->load->view('contact');
$this->load->view('templates/footer');
}
}
我有“emailsender”功能只是将我重定向回与测试相同的页面,但它甚至不会这样做?!我收到“未指定输入文件”。每次都出错。我在 stackoverflow Codeigniter 上阅读了这篇文章,没有指定输入文件错误,但它似乎并没有解决我的问题。我的配置文件看起来像这样..
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
$config['base_url'] = 'http://mywebsitename.com';
$config['index_page'] = "";
$config['uri_protocol'] = "AUTO";
任何想法为什么我会收到 No input file specified 错误?