/ Published in: PHP
The following technical tip shows how php developers can protect their word documents in cloud using Aspose for Cloud SDK in php.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
use Aspose\Cloud\Common\AsposeApp; use Aspose\Cloud\Common\Product; use Aspose\Cloud\Common\Utils; use Aspose\Cloud\Words\Document; /**** Section 1 ****/ Product::$baseProductUri = 'http://api.aspose.com/v1.1'; AsposeApp::$appSID = "xxxxxxxxxxxxxxxxxxxxxxxx"; AsposeApp::$appKey = "xxxxxxxxxxxxxxxxxxxxxxxx"; /**** End Section 1 ****/ /**** Section 2 ****/ $fileName = "Test.docx"; $password = "123456"; $protectionType = "AllowOnlyComments"; $doc = new Document($fileName); $result = $doc->protectDocument($password, $protectionType); /**** End Section 2 ****/