upload.php 698 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/php
  2. <?php
  3. require_once dirname(__FILE__) . '/../../common.php';
  4. system('clear');
  5. print(Demos_Zend_Service_LiveDocx_Helper::wrapLine(
  6. PHP_EOL . 'Uploading Locally Stored Templates to Server' .
  7. PHP_EOL .
  8. PHP_EOL)
  9. );
  10. $phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();
  11. $phpLiveDocx->setUsername(Demos_Zend_Service_LiveDocx_Helper::USERNAME)
  12. ->setPassword(Demos_Zend_Service_LiveDocx_Helper::PASSWORD);
  13. print('Uploading template... ');
  14. $phpLiveDocx->uploadTemplate('template-1.docx');
  15. print('DONE.' . PHP_EOL);
  16. print('Uploading template... ');
  17. $phpLiveDocx->uploadTemplate('template-2.docx');
  18. print('DONE.' . PHP_EOL);
  19. print(PHP_EOL);
  20. unset($phpLiveDocx);