PHP code example of aspose / tasks-sdk-php

1. Go to this page and download the library: Download aspose/tasks-sdk-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aspose / tasks-sdk-php example snippets




	// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration "MY_CLIENT_SECRET");

	$api = new TasksApi(null, $config);

	// upload file to cloud
	$fullName = 'template.mpp';
	$upload_result = $api->uploadFile($Path = realpath(__DIR__ . '/../../..') . '/TestData/' . $fullName, $fullName);

	// save as pdf file
	$request = new Requests\GetReportPdfRequest($fullName, Model\ReportType::MILESTONES, self::$storageName, $folder));
	$result = $api->getReportPdf($request);
bash
composer