apatch 配置伪静态

在项目根目录新建文件  .htaccess 文件,加入如下代码: 

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>

  • 9
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Apache POI提供了许多用于处理Microsoft Office文件的工具,其中包括处理Word文档的工具。如果您想要在Word文档中添加形状,可以使用Apache POI中的XSSF库。以下是基本的代码示例: ``` XWPFDocument doc = new XWPFDocument(); XWPFParagraph para = doc.createParagraph(); // 添加形状 XWPFRun run = para.createRun(); CTAnchor anchor = run.getCTR().addNewDrawing().addNewAnchor(); anchor.setSimplePos2(false); anchor.setRelativeHeight(0); anchor.setRelativeWidth(0); anchor.setDistB(0); anchor.setDistL(0); anchor.setDistR(0); anchor.setDistT(0); CTShape shape = anchor.addNewSp(); shape.setBsln(false); shape.setZOrder(0); CTShapeNonVisual nvSpPr = shape.addNewNvSpPr(); CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr(); cnv.setId(1); cnv.setName("Shape 1"); nvSpPr.addNewCNvSpPr().setTxBox(false); CTShapeProperties spPr = shape.addNewSpPr(); spPr.addNewXfrm().addNewOff().setX(0); spPr.getXfrm().addNewOff().setY(0); spPr.getXfrm().addNewExt().setCx(100000); spPr.getXfrm().getExt().setCy(100000); CTPath2D path = shape.addNewPath(); path.setTextPathOk(true); path.setConnectAngles(false); path.setConnectLocals(false); path.setConnectType(STPathShadeType.NONE); path.setFillRight(false); path.setLayoutMode(STPathLayoutType.NONE); path.setExtrusionOk(false); shape.addNewPrstGeom().setPrst(STShapeType.RECT); shape.addNewStyle().setLnRef("none"); shape.addNewTxBody().addNewP().addNewR().setT("Hello World!"); // 保存文档 FileOutputStream out = new FileOutputStream("example.docx"); doc.write(out); out.close(); doc.close(); ``` 这段代码将在Word文档中添加一个矩形形状,并在其中添加文本“Hello World!”。您可以根据需要更改形状的类型和文本。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值