Jump to content


nelson's Content

There have been 1 items by nelson (Search limited from 09/07/2019)


Ordernar por                Order  

#1020604 Problemas Com Fopen

Posted by nelson on 02/07/2014, 16:48 in PHP

com esta dando o seguinte erro:

Warning: fopen(COM4): failed to open stream: Permission denied in C:\xampp\htdocs\led\Paginas PHP\Arduino\Led-01.php on line 11

Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\led\Paginas PHP\Arduino\Led-01.php on line 12

Warning: fclose() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\led\Paginas PHP\Arduino\Led-01.php on line 13


------------------------------------------------------
codigo em PHP

<?php

if ($_REQUEST["condic"] != "")
{

 switch ($_REQUEST ["condic"])
 {
  case "Ligar LED 01" : $acao = "1"; break;
  case "Desligar LED 01" : $acao = "0"; break;
 }
$conexao = fopen('COM4','w');
fwrite($conexao,$acao);
fclose ($conexao);
 }

 ?>

-------------------------------------------------------

na configuração do apache tive que mudar o arquivo (httpd.conf) Listen 80 para Listen 8081, modifique através de um tutorial de ligação serial entre arduino e serial.

o que sera que é

vlw




IPB Skin By Virteq