这是我的代码
$_SESSION['skin'] = 'kids';
$data = getimagesize("./skin/images/teaser/".$_SESSION['skin'].".jpg");
我收到了这个错误:
mod_fcgid: stderr: PHP Warning: getimagesize(./skin/images/teaser/skin.jpg): failed to open stream: No such file or directory
但我不明白为什么路径是这样的: ./skin/images/teaser/skin.jpg而不是./skin/images/teaser/kids.jpg
当我在getimagesize之前在$ _SESSION ['skin']上使用var_dump时,我得到了正确的输出:
string(4) "kids"