|
本帖最后由 拔凉拔凉的、 于 2013-12-20 13:16 编辑
views>publish.php
controllers>publish.php
PHP复制代码
<?php if ( ! defined("BASEPATH")) exit("No direct script access allowed");
class Publish extends CI_Controller {
public function index (){
$arr["page_tittle"] = "新闻发布页";
$this->load->view("templates/header",$arr);
$this->load->helper(array('form','url'));
$this->load->view("publish");
$this->load->view("templates/footer");
}
function submit (){
$this->load->library('form_validation');
if ($this->form_validation->run() == FALSE){
$this->load->view('myform');
}
else{
$this->load->view('formsuccess');
}
}
}
复制代码
现在很郁闷的是不管你怎样提交,用怎样的方式检查都会是跳转到myform……求各位大神搭救,本人php新手……谢谢!
|
|