$img_path = "/home/www/test.png"; // image path
$args[basename($img_path)] = '@' . realpath($img_path);'@' . realpath($img_path);这句代码执行后应该是什么结果。
'@' .是什么作用。

解决方案 »

  1.   

    不解。只看到过@function_name();
    这时候的@是用来屏蔽function的出错信息。
      

  2.   

    '@' . realpath($img_path);
    为什么要加引号呢?可不可以这样写:  @realpath($img_path);求解
      

  3.   

    你这段代码是在哪看到的,它的功能是这样
    $args[basename($img_path)] = '@' . realpath($img_path);
    basename函数返回$img_path的文件名test.png;
    realpath函数返回规范化的绝对路径名;
    这段代码的意思是数组$args中key为test.png的value为一个字符串,这个字符串是"@"连接$img_path的绝对路径名,如果想用@抑制错误输出的话应该是这样用@realpath($img_path);
      

  4.   

    呵呵,路过看看新手报到,多多支持
    Signature-------------------------------------------------------------------------------------We are what we repeatedly do. Excellence, therefore, is not an act, but a habit ugg boots  ugg Classic Mini  ugg classic tall  ugg classic cardy  ugg classic short