Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

flbhomepage

erro estranho

Recommended Posts

list_cats.php

PHP

[*]<?PHP

[*]/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[*]Configurations

[*]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

[*]

[*]// If it is set to FALSE, the categories wont be displayed

[*]// after a visitor click some category to see the news from it

[*]$display_categories_when_showing_news = TRUE;

[*]

[*]/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[*]Main Part (Do not edit below)

[*]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

[*]$cutepath = __FILE__;

[*]$cutepath = preg_replace( "'list_cats.php'", "", $cutepath);

[*]$cutepath = preg_replace( "'/list_cats.php'", "", $cutepath);

[*]

[*]include("$cutepath/inc/functions.inc.php");

[*]

[*]if(($show_cat != "" and $display_categories_when_showing_news == TRUE) or $show_cat == ""){

[*]$cat_lines = file("$cutepath/data/category.db.php") or die("Can not open $cutepath/data/category.db.php");

[*]foreach($cat_lines as $cat_line){

[*]$cat_arr = explode("|", $cat_line);

[*] echo "<a href="categoria.php?show_cat={$cat_arr[0]}">{$cat_arr[1]}</a><br />";

[*]} 

[*]}

[*]?>

 

categorias.php

PHP

[*]

[*]<? include("$cutepath/inc/functions.inc.php");

[*]

[*]} // chave retirada

[*]if($show_cat != ""){

[*]$category = $show_cat;

[*]include("$cutepath/show_news.php");

[*]}

[*]?>

[*]

[*]

 

 

ERRO: Parse error: parse error, unexpected '}' in /home/areali00/public_html/cutenews/categoria.php on line 3

 

Mas mesmo sem a chave não funciona

 

ai da esse erro

 

Warning: main(): Unable to access /inc/functions.inc.php in /home/areali00/public_html/cutenews/categoria.php on line 1

 

Warning: main(/inc/functions.inc.php): failed to open stream: No such file or directory in /home/areali00/public_html/cutenews/categoria.php on line 1

 

Warning: main(): Unable to access /inc/functions.inc.php in /home/areali00/public_html/cutenews/categoria.php on line 1

 

Warning: main(/inc/functions.inc.php): failed to open stream: No such file or directory in /home/areali00/public_html/cutenews/categoria.php on line 1

 

Warning: main(): Failed opening '/inc/functions.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/areali00/public_html/cutenews/categoria.php on line 1

 

Warning: main(): Unable to access /show_news.php in /home/areali00/public_html/cutenews/categoria.php on line 6

 

Warning: main(/show_news.php): failed to open stream: No such file or directory in /home/areali00/public_html/cutenews/categoria.php on line 6

 

Warning: main(): Unable to access /show_news.php in /home/areali00/public_html/cutenews/categoria.php on line 6

 

Warning: main(/show_news.php): failed to open stream: No such file or directory in /home/areali00/public_html/cutenews/categoria.php on line 6

 

Warning: main(): Failed opening '/show_news.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/areali00/public_html/cutenews/categoria.php on line 6

depois da esse erro... erros no includes mas os arquivos estão todos lá certinho

Compartilhar este post


Link para o post
Compartilhar em outros sites

Você tem que deixar sem a chave, dae você diz que aparece os erros de include, mas é porque sua variavel $cutepath está vazia, e dae ele tá querendo pegar o arquivo /inc/functions.inc.php

Como é servidor é UNIX, a / no começo diz pra ele pegar o a pasta na raiz chamada INC e lah dentro pegas functions.inc.php

 

Tente fazer assim:

 

PHP

[*]include("../inc/functions.inc.php");

 

=)

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.