Foros del Web » Programando para Internet » PHP »

Como se hace???

Estas en el tema de Como se hace??? en el foro de PHP en Foros del Web. A ver si esta vez me se explicar: He hecho una web, una base de datos, y una pagina PHP, cuando veo la pagina PHP, ...
  #1 (permalink)  
Antiguo 18/03/2008, 06:25
 
Fecha de Ingreso: enero-2008
Ubicación: Valencia
Mensajes: 65
Antigüedad: 16 años, 3 meses
Puntos: 2
Como se hace???

A ver si esta vez me se explicar:

He hecho una web, una base de datos, y una pagina PHP, cuando veo la pagina PHP, desde dreamweaver, se conecta al localhost y se ven todos los datos, todos, osea que si funciona, pero mi problema es que, cuando lo miro estando conectado para que se pueda ver en todos lo Pc, me sale esto en vez de las tablas:

<?php require_once('Connections/Liga07.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_Liga07, $Liga07);
$query_Recordset1 = "SELECT * FROM jugagores";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $Liga07) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<table border="1">
<tr>
<td>Numero</td>
<td>Nombre</td>
<td>Goles</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['Numero']; ?></td>
<td><?php echo $row_Recordset1['Nombre']; ?></td>
<td><?php echo $row_Recordset1['Goles']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

que puedo hacer???
  #2 (permalink)  
Antiguo 18/03/2008, 07:14
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 1 mes
Puntos: 574
Re: Como se hace???

Cita:
...me sale esto ...
es el codigo php, por lo tanto el servidor no lo esta ejecutando lo muestra como si fuera texto plano. Que dirección estas usando para acceder al archivo.

debes acceder por http://localhost/tuarchivo.php

Quim
  #3 (permalink)  
Antiguo 18/03/2008, 07:18
Avatar de hulray  
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 17 años, 7 meses
Puntos: 3
Re: Como se hace???

si lo quieres ver desde un pc de la red tienes que verlo de esta manera.

http://laipdetuservidor/index.php

como por ejemplo 192.168.0.10 (un ejemplo)
  #4 (permalink)  
Antiguo 18/03/2008, 09:06
 
Fecha de Ingreso: enero-2008
Ubicación: Valencia
Mensajes: 65
Antigüedad: 16 años, 3 meses
Puntos: 2
Re: Como se hace???

Quiero que se vea en internet, todo el mundo, la por ejemplo un hipervinculo en una pagina .html, que da acceso al archivo 2.php

http://webs.ono.com/rafelcf/3.html
  #5 (permalink)  
Antiguo 18/03/2008, 09:24
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Re: Como se hace???

Al parecer tu servidor no tiene soporte para PHP, en cuyo caso deberás contratar otro servidor con soporte para PHP, o pedirle a tu hosting que habiliten el uso de PHP para tu cuenta.

Saludos.
  #6 (permalink)  
Antiguo 18/03/2008, 09:39
 
Fecha de Ingreso: enero-2008
Ubicación: Valencia
Mensajes: 65
Antigüedad: 16 años, 3 meses
Puntos: 2
Re: Como se hace???

Ok gracias a todos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:01.