首页 文章

Codeigniter查看网址?

提问于
浏览
0

如果我使用绝对网址,我将图像上传到文件夹 . 但如何使用绝对网址?

function do_upload(){$ config ['upload_path'] ='upload /'; $ config ['allowed_types'] ='gif | jpg | png'; $ config ['max_size'] ='100'; $ config ['max_width'] ='1024'; $ config ['max_height'] ='768';

$ this-> load-> library('upload',$ config);

if(!$ this-> upload-> do_upload()){$ error = array('error'=> $ this-> upload-> display_errors());

$ this-> load-> view('upload_form',$ error); } else {$ data = array('upload_data'=> $ this-> upload-> data());

$ this-> load-> view('upload_success',$ data); }}

以上是我的控制器代码 . 我尝试上传,但我不能判断文件夹应该位于哪条路径?要么它应该在root中,要么在控制器中还是在视图中?

1 回答

  • 0

    它应该扎根 .

相关问题