用getimagesize可以做到:array getimagesize ( string filename [, array imageinfo])The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP or IFF image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag. Returns an array with 4 elements. Index 0 contains the width of the image in pixels. Index 1 contains the height. Index 2 a flag indicating the type of the image. 1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order, 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF. These values correspond to the IMAGETYPE constants that were added in PHP 4.3. Index 3 is a text string with the correct height="yyy" width="xxx" string that can be used directly in an IMG tag. 

解决方案 »

  1.   

    读文件的头几个字节FWS flag:FWS
    File version:5
    File Size:983
    Movie width:200
    Movie height:150
      

  2.   

    果然,幸亏我没去手写代码,呵呵
    print_r(getimagesize("../drawline3.swf"));Array ( [0] => 200 [1] => 150 [2] => 4 [3] => width="200" height="150" )
      

  3.   

    haha
    我一直用这种方法,还没有用过读文件的方法
      

  4.   

    http://www.csdn.net/cnshare/soft/13/13646.shtm
    我的小软件 SWF分析 密码拆除 支持 Flash 5/MX
      

  5.   

    to  qiushuiwuhen(秋水无恨) 
    SWF文件的width和Height 不是你写的那么简单的!他是rect型数据!
    你的代码你确定可以 读出真实的 width 和 height 吗?