Problema com PHP.

Espaço para dúvidas, problemas e sugestões gerais sobre o Projeto.
Mensagem
Autor
donovan68
Mensagens: 1
Registrado em: 01 Ago 2008, 12:02

Problema com PHP.

#1 Mensagem por donovan68 »


ola pessoal !
Sou desenvolvedor web , faço sites em PHP,JAVA,MySQL,etc.. e no momento estou adaptando uma versão GPL de um projeto do Sourceforge.net , GEO GPS v.01.
Meu site está em :
[url=http://djalmabina.100webspace.net/GeoGPS/
http://djalmabina.100webspace.net/GeoGPS/
Desculpem, não sei se voces desenvolvem tb para Internet !
Estou com um erro num foreach() assim :
Warning: Invalid argument supplied for foreach() in /home/www/djalmabina.100webspace.net/GeoGPS/html/route.php on line 54

Código: Selecionar todos

 
<?
function printRoutePage($routeObj,$database,$user) {
	include_once('./core/georoute.class.php');
$canedit = (($routeObj->property == $user->id && $routeObj->property > 0) || ($user->authority >= GEO_MIN_AUTH_EDIT && GEO_MIN_AUTH_EDIT > 0)); //true if the user can edit
	
	$points = $database->getPointsById($routeObj->id);
	$route = new Route;
	$route->fromPoints($points);
	
	$link_c = GEO_URL_ROOT.'/index.php?c='.$routeObj->id;
	$link_n = GEO_URL_ROOT.'/index.php?n='.$routeObj->id;
	$link_pdf = GEO_URL_ROOT.'/get/pdf.php?r='.$routeObj->id;
	//download
	$link_file = GEO_URL_ROOT.'/get/file.php?r='.$routeObj->id.'&f=';

	//Near places HTML
	$nearplaces = "<br>";
	$near = $database->getNearNamesById($routeObj->id);
	foreach($near as $point) {
		$nearplaces .= $point->name."<br>\n";
	}   
?>

Notem que esta $near representa pontos próximos à rota selecionada na base de dados e tudo vai para o browser num mapa interativo. Porém o mapa tb não carrega.

http://djalmabina.100webspace.net/GeoGPS/index.php?r=2


Por favor , se puderem me dar uma orientação agradeço muito.

Djalma Bina.
[/i]
[/b]



Voltar para “TrackSource Geral”