Foros del Web » Programando para Internet » PHP »

Difenerncia entre php 5.3.1 y 5.3.12

Estas en el tema de Difenerncia entre php 5.3.1 y 5.3.12 en el foro de PHP en Foros del Web. Hay tanta diferencia entre estas versiones para que este código me lo muestre en la más nueva pero no en la anterior? @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código ...
  #1 (permalink)  
Antiguo 18/06/2010, 13:08
 
Fecha de Ingreso: junio-2010
Mensajes: 16
Antigüedad: 13 años, 10 meses
Puntos: 0
Difenerncia entre php 5.3.1 y 5.3.12

Hay tanta diferencia entre estas versiones para que este código me lo muestre en la más nueva pero no en la anterior?
Código PHP:
Ver original
  1. <?php require_once('Connections/iktools.php'); ?>
  2. <?php
  3. if (!function_exists("GetSQLValueString")) {
  4. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  5. {
  6.   if (PHP_VERSION < 6) {
  7.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  8.   }
  9.  
  10.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  11.  
  12.   switch ($theType) {
  13.     case "text":
  14.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  15.       break;    
  16.     case "long":
  17.     case "int":
  18.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  19.       break;
  20.     case "double":
  21.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  22.       break;
  23.     case "date":
  24.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  25.       break;
  26.     case "defined":
  27.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  28.       break;
  29.   }
  30.   return $theValue;
  31. }
  32. }
  33.  
  34. if (!function_exists("GetSQLValueString")) {
  35. function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  36. {
  37.   if (PHP_VERSION < 6) {
  38.     $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  39.   }
  40.  
  41.   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  42.  
  43.   switch ($theType) {
  44.     case "text":
  45.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  46.       break;    
  47.     case "long":
  48.     case "int":
  49.       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
  50.       break;
  51.     case "double":
  52.       $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
  53.       break;
  54.     case "date":
  55.       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
  56.       break;
  57.     case "defined":
  58.       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  59.       break;
  60.   }
  61.   return $theValue;
  62. }
  63. }
  64.  
  65. mysql_select_db($database_iktools, $iktools);
  66. $query_usuaris = "SELECT * FROM usuaris";
  67. $usuaris = mysql_query($query_usuaris, $iktools) or die(mysql_error());
  68. $row_usuaris = mysql_fetch_assoc($usuaris);
  69. $totalRows_usuaris = mysql_num_rows($usuaris);
  70.  
  71. $maxRows_noticies = 10;
  72. $pageNum_noticies = 0;
  73. if (isset($_GET['pageNum_noticies'])) {
  74.   $pageNum_noticies = $_GET['pageNum_noticies'];
  75. }
  76. $startRow_noticies = $pageNum_noticies * $maxRows_noticies;
  77.  
  78. mysql_select_db($database_iktools, $iktools);
  79. $query_noticies = "SELECT * FROM noticies ORDER BY `data` DESC";
  80. $query_limit_noticies = sprintf("%s LIMIT %d, %d", $query_noticies, $startRow_noticies, $maxRows_noticies);
  81. $noticies = mysql_query($query_limit_noticies, $iktools) or die(mysql_error());
  82. $row_noticies = mysql_fetch_assoc($noticies);
  83.  
  84. if (isset($_GET['totalRows_noticies'])) {
  85.   $totalRows_noticies = $_GET['totalRows_noticies'];
  86. } else {
  87.   $all_noticies = mysql_query($query_noticies);
  88.   $totalRows_noticies = mysql_num_rows($all_noticies);
  89. }
  90. $totalPages_noticies = ceil($totalRows_noticies/$maxRows_noticies)-1;
  91. ?>
  92. <?php
  93. // *** Validate request to login to this site.
  94. if (!isset($_SESSION)) {
  95. }
  96.  
  97. $loginFormAction = $_SERVER['PHP_SELF'];
  98. if (isset($_GET['accesscheck'])) {
  99.   $_SESSION['PrevUrl'] = $_GET['accesscheck'];
  100. }
  101.  
  102. if (isset($_POST['usuari'])) {
  103.   $loginUsername=$_POST['usuari'];
  104.   $password=$_POST['Contraseña'];
  105.   $MM_fldUserAuthorization = "";
  106.   $MM_redirectLoginSuccess = "panel.php";
  107.   $MM_redirectLoginFailed = "error.php";
  108.   $MM_redirecttoReferrer = false;
  109.   mysql_select_db($database_iktools, $iktools);
  110.  
  111.   $LoginRS__query=sprintf("SELECT usuari, contrasenya FROM usuaris WHERE usuari=%s AND contrasenya=%s",
  112.     GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
  113.    
  114.   $LoginRS = mysql_query($LoginRS__query, $iktools) or die(mysql_error());
  115.   $loginFoundUser = mysql_num_rows($LoginRS);
  116.   if ($loginFoundUser) {
  117.      $loginStrGroup = "";
  118.    
  119.     //declare two session variables and assign them
  120.     $_SESSION['MM_Username'] = $loginUsername;
  121.     $_SESSION['MM_UserGroup'] = $loginStrGroup;      
  122.  
  123.     if (isset($_SESSION['PrevUrl']) && false) {
  124.       $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; 
  125.     }
  126.     header("Location: " . $MM_redirectLoginSuccess );
  127.   }
  128.   else {
  129.     header("Location: ". $MM_redirectLoginFailed );
  130.   }
  131. }
  132. ?>
  133. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  134. <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/general.dwt.php" codeOutsideHTMLIsLocked="false" -->
  135. <head>
  136. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  137. <meta name="keywords" content="vcll, militar, tools, ikariam, ikmilitar, board, ikariam.es, ikariam.com, español, castellano, VCLL" />
  138. <link rel="shortcut icon" href="img/favicon.ico">
  139. <!-- InstanceBeginEditable name="doctitle" -->
  140. <title>IK militar tools v. 2.0</title>
  141. <!-- InstanceEndEditable -->
  142. <!-- InstanceBeginEditable name="head" -->
  143. <script type="text/javascript">
  144. <!--
  145. function MM_swapImgRestore() { //v3.0
  146.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  147. }
  148. function MM_findObj(n, d) { //v4.01
  149.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  150.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  151.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  152.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  153.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  154. }
  155.  
  156. function MM_swapImage() { //v3.0
  157.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  158.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  159. }
  160. //-->
  161. </script>
  162. <!-- InstanceEndEditable -->
  163. <link href="estil.css" rel="stylesheet" type="text/css" />
  164. <script type="text/javascript">
  165. <!--
  166. function MM_preloadImages() { //v3.0
  167.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  168.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  169.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  170. }
  171. //-->
  172. </script>
  173. <script language='JAVASCRIPT' type='TEXT/JAVASCRIPT'>
  174.  <!--
  175. /*************************************************************
  176.      AUTHOR: WWW.MUCHOGRAFICO.COM
  177.      URL: http://www.muchografico.com
  178.      Usa el codigo libremente pero salva este mensaje intacto.
  179. **************************************************************/
  180. var win=null;
  181. function NewWindow(mypage,myname,w,h,pos,infocus){
  182. if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
  183. if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
  184. else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
  185. settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
  186. win.focus();}
  187. // -->
  188. </script>
  189. <script type="text/javascript">
  190.   foto=document.getElementById("acede")
  191. </script>
  192. <script type="text/javascript">
  193. function submitForm(formID)
  194. {
  195. document.getElementById(formID).submit();
  196. }
  197. </script>
  198. </head>
  199.  
  200. <body onload="MM_preloadImages('img/terrestreP.jpg')">
  201. <?php include("includes/header.php"); ?>
  202. <!-- InstanceBeginEditable name="Text" -->
  203. Bienvenido a IK militar tools. Esta web fue creada por VCLL y la primera versión fue publicada el 29 de mayo del 2010. Es una web gratuita que permite compactar barallas del ikariam y calcular los costes de un ejército. A demás, con el nuevo sistema de usuarios permite guardar las batallas compactadas y ver las batallas guardadas de otros miembros de tu alianza. Si no estás aún registrado lo puedes hacer <a href="registrar.php">aquí</a>. <br /><br /><br />
  204. <table width="100%" border="0" cellspacing="15">
  205.   <tr>
  206.     <td><a href="compactador_t.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Imagen2','','img/terrestreP.jpg',1)"><img src="img/terrestre.jpg" name="Imagen2" width="250" height="60" border="0" id="Imagen2" /></a></td>
  207.     <td>&nbsp;</td>
  208.     <td>&nbsp;</td>
  209.     </tr>
  210.   <tr>
  211.     <td colspan="3"><h1>Noticias de la web</h1></td>
  212.     </tr>
  213.   <tr>
  214.     <td height="108" colspan="3"><center><table width="70%" border="0" cellspacing="15">
  215.       <?php do { ?>
  216.         <tr>
  217.           <td><p><?php echo $row_noticies['titol']; ?><?php echo $row_noticies['data']; ?></p>
  218.             <p><?php echo $row_noticies['contingut']; ?></p>
  219.             <hr /></td>
  220.         </tr>
  221.         <?php } while ($row_noticies = mysql_fetch_assoc($noticies)); ?>
  222.     </table></center></td>
  223.   </tr>
  224.   </table>
  225. <!-- InstanceEndEditable --><br /></div></div>
  226. <?php include("includes/footer.php"); ?>
  227. </body>
  228. <!-- InstanceEnd --></html>
  229. <?php
  230.  
  231. mysql_free_result($noticies);
  232.  
  233. mysql_free_result($batalles);
  234. ?>
  #2 (permalink)  
Antiguo 18/06/2010, 13:23
Avatar de abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 14 años, 11 meses
Puntos: 1517
Respuesta: Difenerncia entre php 5.3.1 y 5.3.12

Lo mejor es que vayas a la página oficial de PHP y veas que hay en esas versiones que sea diferente. Por lo general, las versiones se crean por arreglar algún bug, no porque hayan añadido alguna función o lo que sea.
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos
  #3 (permalink)  
Antiguo 18/06/2010, 14:05
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Difenerncia entre php 5.3.1 y 5.3.12

a lo mejor realmente se trata de un problema de configuración del php.ini

yo no creo que algo cambie drásticamente así no más
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #4 (permalink)  
Antiguo 18/06/2010, 14:09
 
Fecha de Ingreso: junio-2010
Mensajes: 16
Antigüedad: 13 años, 10 meses
Puntos: 0
Respuesta: Difenerncia entre php 5.3.1 y 5.3.12

No lo sé, es que es algo muy raro ya que no transfiere ni la información.
Supongo que debe ser a que es una cuenta gratuita, ...

Etiquetas: Ninguno
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 02:20.