2013-06-02 3 views
0

는이 같은 형태를 가지고양식 액션 URL 오류

: 나는 그것이 있어야 기대하는 반면
http://localhost://mycodeigniterproject/index.php/mycodeigniter/controllers/index.php/student/insert 

내 코드의 문제점은 무엇입니까? CodeIgniter가 상대 경로를 사용하지 않는 이유는 무엇입니까?

답변

1
트릭을 할해야

echo form_open('student/insert',array('name'=>'myform'); 

이에

echo form_open('/student/insert',array('name=>'myform'); 

에서 양식을 변경

.

편집 :

는보고 here 되세요. 양식 도우미가 어떻게 작동하는지 예를 찾을 수 있습니다.

+0

다시 작동하지 않습니다. 이제 URL이됩니다 http : // localhost : //mycodeigniterproject/index.php/student/mycodeigniter/controllers/index.php/student/insert –

+1

app/config/config.php의'base_url'은 무엇입니까? '$ config [ 'base_url'] \t = 'http : // localhost/mycodeigniterproject /'; ' – Boris

+0

mycodeigniterproject/controllers/ –