Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //file yang akan ditampilkan harus berada di server public (Online)
- //Contoh alamat lengkap file: http://nama_domain/namafile.docx
- //Dokumentasi: https://blogs.office.com/2013/04/10/office-web-viewer-view-office-documents-in-a-browser/ ==> (broken link)
- //URL Dokumentasi terbaru: https://support.office.com/id-id/article/menampilkan-dokumen-office-online-1cc2ea26-0f7b-41f7-8e0e-6461a104544e?ui=id-ID&rs=id-ID&ad=ID
- //LINK preview: https://view.officeapps.live.com/op/view.aspx?src=<<source dokumen>>
- $url = "alamat_lengkap_file";
- echo file_get_contents("https://view.officeapps.live.com/op/view.aspx?src=".urlencode($url)."");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement