這個問題不知能不在該板題問@@
[環境架設/問題簡敘]
我在實體機上ubuntu上架設了shiny server
測試用的shiny範例程式所放路徑:
$cd /opt/shiny-server/samples/sample-apps
並放了幾個範例程式,如下
http://140.128.197.58:3838/sample-apps/
(問題所在!!!!)但在嘗試leaflet地圖套件時出錯:
http://140.128.197.58:3838/sample-apps/leaflet1/
不過leaflet應用在js上就可以了@_@
http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html
這是用rshiny抓取伺服器上mysql的資料
http://140.128.197.58:3838/sample-apps/rmysql2/
[目的]
所以我想用js寫好的leaflet套件用php連接rshiny
或直接用php連sql也可
[程式碼]
以下是js呈現leaflet的code
http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html
<html>
<head>
<title>A Leaflet map!</title>
<link rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<style>
#map{ height: 100% }
</style>
</head>
<body>
<div id="map"></div>
<script>
// initialize the map
var map = L.map('map').setView([24.179,120.601], 16);
// load a tile layer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a>
contributors'
}).addTo(map);
L.marker([24.179,120.601]).addTo(map)
.bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
.openPopup();
</script>
</body>
</html>
[環境版本]
ubuntu 14.04.05
shiny-server 1.5.1
R 3.3.2
leaflet 1.0.1
請問可能行嗎??
php初學者讓如何入門??