我正在尝试让highcharts每分钟刷新一次新数据。到目前为止,我已经使用php在头上输出javascript来创建图表。
我在页面的顶部有这个:
<?php
//set the output header as JS
Header("content-type: application/x-javascript");
//output start of javascript chart
?>
var chart;
chart = new Highcharts.Chart({
然后一些PHP从数据库中获取数据,并以highchar
<style>div.container {
max-width: 800px;
max-height: 800px;
display: inline-block;
}
<body>
<h1>Your Selection</h1>
<p>Here is the information you have submitted:</p>
<div class="container">
<ol>
<li><em>AID:
我使用的是AWS m4 large (2vCPU,8Gib内存) AMI Linux os,nginx & php-fpm配置如下
nginx.conf
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
所以我正在用Laravel 7制作目录。*我有个问题。
我有很多产品和种类。我已经建立了一个多到多的关系,以便一个产品可以在许多类别。
现在,我试图做的是在一页显示每一个类别与相关的产品,但显然我做错了什么。
下面您可能会看到一些代码:
Product.php:
public function categories()
{
return $this->belongsToMany(Category::class);
}
Category.php:
public function product()
{
return $this->belongsToMany(Product::clas