Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用PHP在NextCloud中创建日历事件_Php_Curl_Put_Caldav_Nextcloud - Fatal编程技术网

使用PHP在NextCloud中创建日历事件

使用PHP在NextCloud中创建日历事件,php,curl,put,caldav,nextcloud,Php,Curl,Put,Caldav,Nextcloud,我正试图用PHP和cURL在Nextcloud中创建一个日历事件。从命令行运行代码后,我从Nextcloud 12得到以下错误: PUT is not allowed on non-files. 下面是我使用的完整代码 这是否意味着Nextcloud中的CalDAV不支持PUT?那么,像Thunderbird Lightning这样的日历应用程序如何在Nextcloud中创建事件呢 在Nextcloud中,我找不到有关CalDAV实现的任何信息。如果使用HTTPPUT请求,其目的是在引用的

我正试图用PHP和cURL在Nextcloud中创建一个日历事件。从命令行运行代码后,我从Nextcloud 12得到以下错误:

PUT is not allowed on non-files.
下面是我使用的完整代码


这是否意味着Nextcloud中的CalDAV不支持PUT?那么,像Thunderbird Lightning这样的日历应用程序如何在Nextcloud中创建事件呢


在Nextcloud中,我找不到有关CalDAV实现的任何信息。

如果使用HTTP
PUT
请求,其目的是在引用的uri处替换资源。因此,您的示例HTTP请求告诉我您正在替换:

对吗?可能不会!您可能希望在该集合中创建新的日历资源。因此,为您的资源选择一个尚不存在的新url:

https://cloud.org/remote.php/dav/calendars/mycalendars/activity/foo-bar-baz.ics
https://cloud.org/remote.php/dav/calendars/mycalendars/activity
https://cloud.org/remote.php/dav/calendars/mycalendars/activity/foo-bar-baz.ics