获取当前你正在访问的页面互联网所在的目录,这里的index.php是页面名称
$basepath=substr($_SERVER[“PHP_SELF”],0,strpos($_SERVER[“PHP_SELF”],”index.php”));</p>
$basepath=substr($_SERVER[“PHP_SELF”],0,strpos($_SERVER[“PHP_SELF”],”index.php”));</p>
和这个目录拼接成实际的地址
$output_name=”http://”.$_SERVER[“SERVER_NAME”] .$basepath;
获取上传文件的扩展名
$tmp_filename = $file[‘tmp_name’];
$ext = end(explode(“.”,$file[‘name’]));
这里都是一些山寨用法,还需要讨论。。