简体   繁体   中英

How to encode an .ics header from JavaScript to PHP?

How can I post a JavaScript variable like the one below into a PHP script? (This is part of a .ics header):

var contents = "" +
'BEGIN:VCALENDAR' +
'\n' +
'VERSION:2.0' + 
'\n' + 
'PRODID:-// LIVEMEETING INTG//EN' +
'\n' +
'METHOD:CANCEL' +
'\n' +
'BEGIN:VEVENT' +
'\n' +
'UID:' + liveMeetingId + '@email.com' +
'\n';

It's a simple string. You can use AJAX to send it to a server-side script; the easiest way is via jQuery's $.ajax() method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM