PHP not found when i run on eclipse PDT -
im doing app needs server databases , code take data them. have functions coded in php. example, have project called "api_kirolapp" contains php files one:
<?php /*mejoras de escalabilidad. ahora la lista de países puede ser actualizada según se añadan países con deportes.*/ //recoger información para query: $continentid= 1; //$_get['idcontiente']; //el id del continente es columna de paises echo "hola \n"; //iniciamos la solicitud de información $server = "127.0.0.1:3306"; $conn = mysqli_connect($server, "root", "root", "kiroldb_v2",3306); $query = "select * kiroldb_v2.pais continente_idcontinente=$continentid"; $result = mysqli_query($conn, $query); $countries = array(); $i = 1; if(mysqli_num_rows($result) != 0){ $countries[0] = 'success'; while($row = mysqli_fetch_array($result)){ $countries[$i] = $row['nombre']; $i++; } return json_encode($countries); }else{ $countries[0] = 'error'; return json_encode($countries); }
when execute it, "run" in eclipse php web application, eclipse try execute url: http://localhost/api_kirolapp/getcountries.php 404 error appears, thought not correct path , tried full path http://localhost/home/myname/workspacephp/api_kirolapp/getcountries.php however, error same. dont know how works eclipse php. installed wildfly cant run on php files. must do?
Comments
Post a Comment