Arduino Forum
>
Products
>
Arduino Yún
>
PHP
Print
Go Down
Pages:
[1]
Topic: PHP
(Read 1 time)
previous topic
-
next topic
berniekruger
Guest
PHP
Nov 07, 2013, 10:34 pm
Hi,
Apologies if this was asked before. I am still new to the YUN.
I am happy with installing PHP - enough info on the forums - thanks.
Can someone please direct me to information on how to
call a PHP script
from within a sketch and
share values
between a sketch and PHP?
Cheers
Erni
Edison Member
Posts: 1,269
Karma: 174
[add]
Happy Hobbyist
http://www.ernstc.dk/arduino/tinycom.html
Re: PHP
#1
Nov 08, 2013, 12:48 am
If you insatll php5-cli you can run your php scripts from the command line, and also call them from
your sketches.
Forexample use the runShellCommand
Code:
[Select]
p.runShellCommand("php-cli /usr/bin/test.php 3 2>&1");
berniekruger
Guest
Re: PHP
#2
Nov 08, 2013, 10:56 pm
Tx for the reply. One last question, what is the "3 2>&1" options behind the script name?
Cheers
Erni
Edison Member
Posts: 1,269
Karma: 174
[add]
Happy Hobbyist
http://www.ernstc.dk/arduino/tinycom.html
Re: PHP
#3
Nov 09, 2013, 12:04 pm
I made the test.php script so that it takes one argument, so test.php 3, is just the argument.
2>&1 is a redirection stderr to stdout, so that errors will show up in the serial monitor
Print
Go Up
Pages:
[1]
Loading...