| Autor | Zpráva | ||
|---|---|---|---|
| Leošek Profil * |
#1 · Zasláno: 16. 8. 2014, 12:00:15
Dobry den.
Jsem uplna lama. Pomužete? Toto je zdrojak staženy s netu a funguje. <html>
<head>
<?php
if (isset($_POST['Button1']))
{
system('sudo /var/www/scripts/test.py > /dev/null &');
}
if (isset($_POST['Button2']))
{
exec('sudo python /var/www/red_off.py');
}
if (isset($_POST['Button3']))
{
exec('sudo python /var/www/gpio/yellow_on.py');
}
if (isset($_POST['Button4']))
{
exec('sudo python /var/www/gpio/yellow_off.py');
}
if (isset($_POST['Button5']))
{
exec('sudo python /var/www/gpio/green_on.py');
}
if (isset($_POST['Button6']))
{
exec('sudo python /var/www/gpio/green_off.py');
}
?>
<title></title>
</head>
<body>
<body style="background-color: green; color: yellow;">
<form method="post">
<table
style="width: 75%; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
</tr>
<tr>
<td style="text-align: center;"><button name="Button1">První button </button></td> </tr>
<tr>
<td style="text-align: center;"><button name="Button2">Druhy button</button></td>
</tr>
<tr>
<td style="text-align: center;"><button name="Button3">Button 3</button></td>
</tr>
<tr>
<td style="text-align: center;"><button name="Button4">Button 4</button></td>
</tr>
<tr>
<td style="text-align: center;"><button name="Button5">Button 5</button></td>
</tr>
<tr>
<td style="text-align: center;"><button name="Button6">Button 6</button></td>
</tr>
</tbody>
</table>
</form>
</body>
</html><td style="text-align: center;"><button name="Button1">První button </button></td> </tr> Jak upravít toto tlačitko aby fungovalo s tým PHP skryptem. Prostě jak tam přidat tu hodnoto Button1. <input type="submit" id="Button1" name="" value="Submit" style="position:absolute;left:240px;top:185px;width:96px;height:25px;z-index:1;"> |
||
| Micruss Profil |
#2 · Zasláno: 16. 8. 2014, 12:06:27
místo id="Button1" dej name="Button1"
|
||
| Leošek Profil * |
#3 · Zasláno: 16. 8. 2014, 14:58:40
Děkují.
Možna jsi poznal že to zkoušim přes WYSIWYG Web Builder. Když u tlačitka v properties nastavím name Button1 tak to funguje. <input type="submit" id="Button1" name="Button1" value="Moje tlačitko" style="position:absolute;left:278px;top:337px;width:96px;height:25px;z-index:0;"> Když však vezmu button se sady "jQuery UI tak to nefunguje <input type="button" id="jQueryButton1" name="Button1" value="Moje" style="position:absolute;left:321px;top:522px;width:100px;height:100px;z-index:0;"> Jaky je rozdil mezí něma a proč to nefunguje. Je to skoro stejne jen jeden ma type subnit a druhy button a rozlišne id Oba však maji name="Button1" |
||
|
Časová prodleva: 12 let
|
|||
0