?> " thumb="<?php echo $file['thumb'] ? "yes" : "no"; ?> " smallThumb="<?php echo $file['small_thumb'] ? "yes" : "no"; ?> " fileId="<?php echo $file['file_id']; ?> " attachId="<?php echo $file['attach_id']; ?> "> <name><?php echo kc_text::xml_data($file['name']); ?> </name> </file> <?php } ?> </files> <filescount><?php echo $files_count; ?> </filescount> <filessize><?php echo $files_size; ?> </filessize>
<root> <?php if (is_array($message)) { foreach ($message as $msg) { ?> <error><?php echo kc_text::xml_data($msg); ?> </error> <?php } } else { ?> <error><?php echo kc_text::xml_data($message); ?> </error> <?php } ?> </root>
/** * 超时错误处理 **/ protected function time_error_msg($message, $data = null) { $output = '<root>'; if (is_array($message)) { foreach ($message as $msg) { $output .= '<error>' . kc_text::xml_data($msg) . '</error>'; } } else { $output .= '<error>' . kc_text::xml_data($message) . '</error>'; } $output .= '</root>'; header("Content-Type: text/xml; charset=UTF-8"); die($output); }
<root> <name><?php echo kc_text::xml_data($name); ?> </name> </root>
<root> <?php foreach ($dirs as $dir) { ?> <dir readable="<?php echo $dir['readable'] ? "yes" : "no"; ?> " writable="<?php echo $dir['writable'] ? "yes" : "no"; ?> " removable="<?php echo $dir['removable'] ? "yes" : "no"; ?> " hasDirs="<?php echo $dir['has_dirs'] ? "yes" : "no"; ?> " dirId="<?php echo $dir['id']; ?> "> <name><?php echo kc_text::xml_data($dir['name']); ?> </name> </dir> <?php } ?> </root>