Kanthi solusi iki, PHP pangembang bisa gampang nggawe MD mung nganggo sawetara baris kode. Solusi kita bakal menehi sampeyan kabeh sing dibutuhake kanggo nggawe MD nggunakake PHP SDK.
Kanthi REST API, pangembang PHP bisa nggawe MD dokumen kanthi gampang. Kanggo nindakake iki, sampeyan kudu nindakake sawetara langkah nggunakake PHP SDK kita:
Wiwit MD dokumen kosong mesthine ngemot siji paragraf, nalika sampeyan nggawe MD file kanthi program, sampeyan bakal entuk struktur dhasar kasebut.
Elinga yen sampeyan bisa nambah konten menyang MD dokumen sing mentas digawe. Mangkono, sampeyan bakal entuk ora mung file kosong, nanging MD dokumen sing ngemot konten sing dibutuhake. Kanggo informasi luwih lengkap babagan carane ngowahi MD dokumen, deleng kaca 'Edit MD'.
Kaya sing wis kasebut, PHP SDK kita ngidini sampeyan nggawe MD dokumen kanthi program. Sampeyan bisa nyoba fungsi sing kuat lan ngevaluasi carane nggawe MD dokumen nggunakake conto PHP ing ngisor iki:
use Aspose\Words\WordsApi;
$wordsApi = new WordsApi("##################", '##################');
$fileName = "Output.md";
$createDocumentRequest = new CreateDocumentRequest(
$fileName, NULL, NULL
);
$wordsApi->createDocument($createDocumentRequest);
$downloadDocumentRequest = new DownloadFileRequest(
$fileName, NULL, NULL
);
$wordsApi->downloadFile($downloadDocumentRequest);
Instal 'Aspose.Words Cloud SDK for PHP' saka gudang Packagist. Mung mbukak composer require aspose-cloud/aspose-words-cloud kanggo nginstal SDK, banjur gunakake require_once('vendor/autoload.php'); kanggo ngimpor menyang proyek sampeyan.
Minangka alternatif, sampeyan bisa kanthi manual kloning Aspose.Words Cloud SDK for PHP saka GitHub. Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
PHP 7.1 utawa luwih anyar
Deleng Repository Documentation kanggo ndeleng rincian liyane.