本文整理汇总了PHP中CreateDocx::addLink方法的典型用法代码示例。如果您正苦于以下问题:PHP CreateDocx::addLink方法的具体用法?PHP CreateDocx::addLink怎么用?PHP CreateDocx::addLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CreateDocx
的用法示例。
在下文中一共展示了CreateDocx::addLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CreateDocx
<?php
/**
* Insert a link into a Word document.
*
* @category Phpdocx
* @package examples
* @subpackage easy
* @copyright Copyright (c) Narcea Producciones Multimedia S.L.
* (http://www.2mdc.com)
* @license LGPL
* @version 3.0
* @link http://www.phpdocx.com
* @since File available since Release 3.0
*/
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addLink('Link to Google', array('url' => 'http://www.google.es', 'font' => 'Arial', 'color' => 'blue', 'u' => 'single'));
$docx->createDocx('../docx/example_link');
示例2: CreateDocx
<?php
/**
* Create a DOCX file. Link example
*
* @category Phpdocx
* @package examples
* @subpackage easy
* @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
* (http://www.2mdc.com)
* @license LGPL
* @version 2.0
* @link http://www.phpdocx.com
* @since File available since Release 2.0
*/
require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addLink('Link to Google', 'http://www.google.es', 'Arial');
$docx->createDocx('example_link');
示例3: CreateDocx
<?php
//path to the CreateDocx class within your PHPDocX installation
require_once '../../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$docx->addLink('Link to Google', array('url' => 'http://www.google.es'));
$docx->addText('And now the same link with some additional formatting:');
$linkOptions = array('url' => 'http://www.google.es', 'color' => 'B70000', 'underline' => 'none');
$docx->addLink('Link to Google in red color and not underlined', $linkOptions);
$docx->createDocx('example_addLink_1');