I create a php file under localhost:8000,and set it as welcome file in config, it works and I can now control gpio, but I find php code in my file can not run ,but if I delete :8000 and set address as localhost/xxx.php it works!
--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thanks in advance,
Martyn
<body> <div class="nav"> <ul> <li><a href="index.html">Home</a></li> <li><a href="app/gpio-header">GPIO Pins</a></li> <li><a href="http://192.168.0.4">Pi 2</a></li> <li><a href="status.htm">System Status</a></li> /ul> </div>
This creates a set of unordered links, the index.html is your current page (Home) as displayed on button, the
GPIO Pins is a link to the GPIO pins, Pi 2, could be a link to a second Pi on your home network, or any other
page for that matter, and System Status, is just an example of another page called system status.
To style the links use CSS code between the <style> </style> tags:
.nav { margin 0em;
font-size: 22px;
width: 100%;
background-color: #3a3a4b;
height: 38px; }
.nav ul { display: inline; }
.nav li { display: inline;
padding: 0em 1em;
border: 5px outset #3a3a3a;
text-align: center;
}
.nav a:link, .nav a:visited { text-decoration: none; color: #a0522d; }
.nav a:hover { color: #ffd700; }
.nav a:focus { color: #fff; }
The above will produce a simple hozizontal menu with grey background, brown text,
which changes to yellow when the mouse is over. You dont need, PHP, javascript,
or dreamweaver for these simple menues. Hope that helps.
--
You received this message because you are subscribed to the Google Groups "WebIOPi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webiopi+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I may said something wrong : webiopi webserver cannot serve php page (as far as i know)
You need a separated web server such as apache to handle php. And wepiopi for the rest api.
Barbudor
Thanks Barbu, I'm beginning to understand now. I don't actually wish to drive webiopi with php, I'm just more familiar with it than javascript and want to add more dynamic content to my 'control panel' page. I've looked into using javascript to achieve what I want, it seems do-able. Also looking into REST API, thank you for your help.