<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Script che funziona con php4 e non con php5]]></title><description><![CDATA[<p dir="auto">Ho uno script php che con php4 va benissimo ma con php5 ....non da niente! <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f62e.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--open_mouth" style="height:1.4em;width:auto;vertical-align:middle" title=":o" alt="😮" /></p>
<p dir="auto">In realtà crea una pagina all'interno della quale viene richimato un altro script php (con un suo template .html).</p>
<p dir="auto">Questo è lo script:</p>
<pre><code class="language-php">include_once("module_config.php");
include_once("php/gen/startup.php");
if(!$debug)
{
 error_reporting(0);
}
$user_level=4;
if(!$glob['pag'])
{
 $glob['pag']='home';
}

if($glob['act'] &amp;&amp; !$glob['skip_action'])
{
 include_once("php/gen/func_perm.php");
 list($cls_name,$func_name )=split("-",$glob['act']);
 if(($cls_name)&amp;&amp;($func_name)&amp;&amp;(is_file("classes/cls_".$cls_name.".php"))&amp;&amp;($func_access[$cls_name][$func_name]))
 {
     if($user_level&lt;=$func_access[$cls_name][$func_name])
        {
         include_once("classes/cls_".$cls_name.".php");
            $cls_name= new $cls_name;
            if (!$cls_name-&gt;$func_name($glob))
            {
             if($debug)
             {
              $glob['error'].="Failed to execute function $func_name";
             }
            }
            unset($cls_name);
            unset($func_name);
        }
        else
        {
            if($debug)
            {
          $glob['error']= "You are not allowed to run this function !"; 
            }
            $glob['pag']= "home"; 
        }
    }
    else
    {
      if($debug)
            {
              echo "Can not find cls_".$cls_name.".php file&lt;BR&gt;"; 
            }   
    }
}
 
include_once("php/gen/page_perm.php");
 
if($glob['pag'])
{
 
    if($page_access[$glob['pag']]['perm'] &amp;&amp; $page_access[$glob['pag']]['perm'] &gt;= $user_level)
    {
     
     $page=include("php/".$glob['pag'].".php");
     
    }
    else
    {
     $page=include("php/home.php");
     
    }
}
//$menu=include("php/gen/menu.php");
// mio ultimi

     
  $ultimi=include("index_last_home.php") ;  
  $vetrina=include("car_vetrina_home.php") ;    
  $marche=include("marche.php") ;
 

// fine mio ultimi
$ftm=new FastTemplate("");
$ftm-&gt;define(array('main'=&gt;"main_template.html"));
$ftm-&gt;assign('PAGE',$page);
$ftm-&gt;assign('ULTIMO',$ultimo);
$ftm-&gt;assign('VETRINA',$vetrina);
$ftm-&gt;assign('MARCHE',$marche);
//$ftm-&gt;assign('MENU',$menu);
$ftm-&gt;parse('CONTENT','main');
$ftm-&gt;fastprint('CONTENT');
</code></pre>
<p dir="auto">Praticamente all'interno di PAGE richiama home.php ....ma con php5....non funzia!!!!!!!<br />
<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f622.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--cry" style="height:1.4em;width:auto;vertical-align:middle" title=":cry:" alt="😢" /></p>
]]></description><link>https://dev.connect.gt/topic/89143/script-che-funziona-con-php4-e-non-con-php5</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 14:38:20 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/89143.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Dec 2008 23:47:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script che funziona con php4 e non con php5 on Tue, 02 Dec 2008 11:40:51 GMT]]></title><description><![CDATA[<p dir="auto">Non funge uguale....</p>
<p dir="auto">Non riesco davvero a capire...con php4 funziona da favola ma con il php5 nisba....</p>
<p dir="auto">Questa è la function PARSE :</p>
<pre><code class="language-php">//        ************************************************************
//        The meat of the whole class. The magic happens here.
        function parse ( $ReturnVar, $FileTags )
        {
                $append = false;
                $this-&gt;LAST = $ReturnVar;
                $this-&gt;HANDLE[$ReturnVar] = 1;
                if (gettype($FileTags) == "array")
                {
                        unset($this-&gt;$ReturnVar);        // Clear any previous data
                        while ( list ( $key , $val ) = each ( $FileTags ) )
                        {
                                if ( (!isset($this-&gt;$val)) || (empty($this-&gt;$val)) )
                                {
                                        $this-&gt;LOADED["$val"] = 1;
                                        if(isset($this-&gt;DYNAMIC["$val"]))
                                        {
                                                $this-&gt;parse_dynamic($val,$ReturnVar);
                                        }
                                        else
                                        {
                                                $fileName = $this-&gt;FILELIST["$val"];
                                                $this-&gt;$val = $this-&gt;get_template($fileName);
                                        }
                                }
                                //        Array context implies overwrite
                                $this-&gt;$ReturnVar = $this-&gt;parse_template($this-&gt;$val,$this-&gt;PARSEVARS);
                                //        For recursive calls.
                                $this-&gt;assign( array( $ReturnVar =&gt; $this-&gt;$ReturnVar ) );
                        }
                }        // end if FileTags is array()
                else
                {
                        // FileTags is not an array
                        $val = $FileTags;
                        if( (substr($val,0,1)) == '.' )
                        {
                                // Append this template to a previous ReturnVar
                                $append = true;
                                $val = substr($val,1);
                        }
                        if ( (!isset($this-&gt;$val)) || (empty($this-&gt;$val)) )
                        {
                                        $this-&gt;LOADED["$val"] = 1;
                                        if(isset($this-&gt;DYNAMIC["$val"]))
                                        {
                                                $this-&gt;parse_dynamic($val,$ReturnVar);
                                        }
                                        else
                                        {
                                                $fileName = $this-&gt;FILELIST["$val"];
                                                $this-&gt;$val = $this-&gt;get_template($fileName);
                                        }
                        }
                        if($append)
                        {
                                $this-&gt;$ReturnVar .= $this-&gt;parse_template($this-&gt;$val,$this-&gt;PARSEVARS);
                        }
                        else
                        {
                                $this-&gt;$ReturnVar = $this-&gt;parse_template($this-&gt;$val,$this-&gt;PARSEVARS);
                        }
                        //        For recursive calls.
                        $this-&gt;assign(array( $ReturnVar =&gt; $this-&gt;$ReturnVar) );
                }
                return;
        }        //        End parse()

//        ************************************************************
</code></pre>
<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title=":x:" alt="❌" />x</p>
]]></description><link>https://dev.connect.gt/post/788133</link><guid isPermaLink="true">https://dev.connect.gt/post/788133</guid><dc:creator><![CDATA[predire]]></dc:creator><pubDate>Tue, 02 Dec 2008 11:40:51 GMT</pubDate></item><item><title><![CDATA[Reply to Script che funziona con php4 e non con php5 on Tue, 02 Dec 2008 09:18:16 GMT]]></title><description><![CDATA[<p dir="auto">[..]</p>
<p dir="auto">Posso provarci ....ma non coprendo, perdonami la differenza...<br />
Anche perchè, scusa se ne approfitto della tua gentilezza, non capisco perchè con php4 tutto funzio in modo impeccabile...come carico php5 ...</p>
<p dir="auto">Io pensavo fosse più questa assegnazione : $ftm-&gt;assign('PAGE',$page);<br />
a creare caos....<br />
Purtroppo per provare (dispongo di un solo server) devo caricare di nuovo php5 .... <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=12b9555a9a1" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
]]></description><link>https://dev.connect.gt/post/788129</link><guid isPermaLink="true">https://dev.connect.gt/post/788129</guid><dc:creator><![CDATA[predire]]></dc:creator><pubDate>Tue, 02 Dec 2008 09:18:16 GMT</pubDate></item><item><title><![CDATA[Reply to Script che funziona con php4 e non con php5 on Tue, 02 Dec 2008 08:38:19 GMT]]></title><description><![CDATA[<p dir="auto">Sei sicuro del modo in cui stai utilizzando include()?<br />
Non è che dovresti usare un codice tipo:</p>
<pre><code class="language-php">ob_start();
include("index_last_home.php") ;
$ultimi = ob_get_clean();
</code></pre>
]]></description><link>https://dev.connect.gt/post/788131</link><guid isPermaLink="true">https://dev.connect.gt/post/788131</guid><dc:creator><![CDATA[filippotoso]]></dc:creator><pubDate>Tue, 02 Dec 2008 08:38:19 GMT</pubDate></item><item><title><![CDATA[Reply to Script che funziona con php4 e non con php5 on Tue, 02 Dec 2008 08:36:06 GMT]]></title><description><![CDATA[<p dir="auto">Ciao innanzitutto buongiorno.<br />
No non visualizzo nulla.<br />
Ho provato con le query...prese da sole funzionano.<br />
E' come se nella variabile PAGE php non riuscisse a passare l'include di home.php .<br />
In pratica la prima pagina (index.php) legge un template html nel quale è posizionato la variabile {PAGE} al cui interno dovrebbe aversi l'assegnazione dell'include di home.php (che a sua volta fa delle queri e legge un suo template home.htm ).<br />
Lo stesso anche in altre pagine...ci sono dei template che hanno variabili del tipo {xxxxx}....<br />
Con php4 funzia ....con php5....ho solo il template inziale senza l'inclusione dell'home.php e quindi delle necessarie funzioni....<br />
Con php5 ho anche attivato lo zend1 (retrocompatibilità) ma il problema resta....</p>
]]></description><link>https://dev.connect.gt/post/788135</link><guid isPermaLink="true">https://dev.connect.gt/post/788135</guid><dc:creator><![CDATA[predire]]></dc:creator><pubDate>Tue, 02 Dec 2008 08:36:06 GMT</pubDate></item><item><title><![CDATA[Reply to Script che funziona con php4 e non con php5 on Tue, 02 Dec 2008 07:53:27 GMT]]></title><description><![CDATA[<p dir="auto">Che cosa intendi per "non funziona"?<br />
Che comportamento ottieni?<br />
Se visualizzi il sorgente della pagina restituita al browser, noti qualcosa di strano (es. codice PHP)?<br />
Abilitando la visualizzazione di tutti gli errori, viene mostrato qualcosa di utile (es. warning, notice, etc.)?</p>
]]></description><link>https://dev.connect.gt/post/788128</link><guid isPermaLink="true">https://dev.connect.gt/post/788128</guid><dc:creator><![CDATA[filippotoso]]></dc:creator><pubDate>Tue, 02 Dec 2008 07:53:27 GMT</pubDate></item></channel></rss>