有没有办法在Moodle页面中添加动态内容?我使用Pages Plugin来创建页面,但我没有办法在其中添加动态内容.
我已经测试了我的网站的速度,虽然太好了,但是它向我展示了一些需要修复的问题。其中之一是“添加过期标头”。我搜索后发现,我必须编辑.htaccess文件,并且需要添加到期标题内容。我在.htaccess文件中进行了更改,但无法正常工作
以下是我的代码
<FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
<IfModule mod_headers.c>
Header unset Pragma
Header append Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>
# Expires headers (for better cache control)
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 …Run Code Online (Sandbox Code Playgroud) 我在基于所选产品的价格规则的cURL调用中收到错误.以下是我的错误:
{
"errors":{
"price_rule":"Required parameter missing or invalid"
}
}
Run Code Online (Sandbox Code Playgroud)
以下是我在cURL电话中发送的身体参数:
{
"price_rule":{
"title":"sss",
"target_type":"line_item",
"target_selection":"entitled",
"allocation_method":"across",
"value_type":"fixed_amount",
"value":"-434",
"customer_selection":"all",
"prerequisite_quantity_range":{
"greater_than_or_equal_to":"2"
},
"entitled_product_ids":{
"0":"2397130326093",
"1":"2397129965645",
"2":"2397131898957",
"3":"2397132324941"
},
"starts_at":"2019-02-22T08:08:53.000Z"
}
}
Run Code Online (Sandbox Code Playgroud)
以下是我的cURL电话:
$ch = curl_init();
// curl_setopt($ch, CURLOPT_POST, count($newrule));
curl_setopt($ch, CURLOPT_URL, $access_token_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($pro_ids11));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Shopify-Access-Token: '.$shops_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
if (curl_error($ch)) {
$error_msg = curl_error($ch);
}
curl_close($ch);
if (isset($error_msg)) {
echo $error_msg;
}
Run Code Online (Sandbox Code Playgroud)
请注意我在PHP工作.提前致谢!