<?php if ($argc != 2 || in_array($argv[1], array('--help', '-help', '-h', '-?'))) { //命令行方式 //配置config/config.php 下面的IMAGE_STORE_ROOT_PATH(图片的存储目录) //配置sql/config/common.inc.php 下面的数据库路径 //运行成功后,请删除文件,(清空原数据) //配置config/config.php 下面的IMAGE_STORE_ROOT_PATH(图片的存储目录) require_once dirname(__FILE__).'/../../config/YUCAttachment.const.inc.php'; require_once dirname(__FILE__).'/../../service/config/YUSCAttachment.cfg.inc.php'; //配置数据库 require_once dirname(__FILE__).'/../../sql/config/common.inc.php'; require_once dirname(__FILE__).'/ResizeImage.class.php'; $resize = new ResizeImage(); $resize->resizeAllImage(); } else { echo "command"; } ?>