MediaWiki API - 为项目符号点换行
MediaWiki API - Using new line for bullet points
我在尝试使用 MediaWiki 做项目符号点时遇到问题 API,我不知道如何让它做新行,所有内容都在同一行上。
我试过使用
$maps[] = "* " . $mapName . "<br/>";
$maps[] = "* " . $mapName . "\n";
$maps[] = "* " . $mapName . "\r\n";
None 其中作品
我正在使用
更新 wiki
$endPoint = "URL";
$params4 = [
"action" => "edit",
"title" => $title,
"text" => $content,
"token" => $csrf_Token,
"format" => "json"
];
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $endPoint );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $params4 ) );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_COOKIEJAR, "cookie.txt" );
curl_setopt( $ch, CURLOPT_COOKIEFILE, "cookie.txt" );
$output = curl_exec( $ch );
curl_close( $ch );
使用
让它工作
$maps[] = "* [[" . $mapName . "]]<br/>%0D%0A";
我在尝试使用 MediaWiki 做项目符号点时遇到问题 API,我不知道如何让它做新行,所有内容都在同一行上。
我试过使用
$maps[] = "* " . $mapName . "<br/>";
$maps[] = "* " . $mapName . "\n";
$maps[] = "* " . $mapName . "\r\n";
None 其中作品
我正在使用
更新 wiki$endPoint = "URL";
$params4 = [
"action" => "edit",
"title" => $title,
"text" => $content,
"token" => $csrf_Token,
"format" => "json"
];
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $endPoint );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $params4 ) );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_COOKIEJAR, "cookie.txt" );
curl_setopt( $ch, CURLOPT_COOKIEFILE, "cookie.txt" );
$output = curl_exec( $ch );
curl_close( $ch );
使用
让它工作$maps[] = "* [[" . $mapName . "]]<br/>%0D%0A";