Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Include W Echo! Jak?
Kaczor.net
post 28.08.2004, 12:10:50
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 11.05.2003

Ostrzeżenie: (0%)
-----


  1. <?
  2.  
  3. $file_name=&#092;"linki/data/data.php\";
  4. $file_data=file($file_name);
  5. $file_data=array_reverse($file_data);
  6.  
  7. for($i=0; $i<count($file_data); $i++){$file=explode('||',$file_data[$i]);
  8.  
  9. echo'<tr>
  10. <td width=\"175\" height=\"24\">&nbsp;<a href=\"http://'.$file['2'].'/\" target=\"_blank\">'.$file['1'].'</a></td>
  11. <td width=\"75\" height=\"24\" align=\"center\"><? include(\"linki/klik/'.$file['1'].'.txt\"); ?></td>
  12. </tr>';}
  13.  
  14. ?>


Czemu to nie działa? Jak zrobić by include działało w echo?

Ten post edytował Kaczor.net 28.08.2004, 13:10:40
Go to the top of the page
+Quote Post
marcin96
post 28.08.2004, 12:19:25
Post #2





Grupa: Zarejestrowani
Postów: 57
Pomógł: 0
Dołączył: 21.08.2003
Skąd: Będzin

Ostrzeżenie: (0%)
-----


  1. <?
  2.  
  3. $file_name=&#092;"linki/data/data.php\";
  4. $file_data=file($file_name);
  5. $file_data=array_reverse($file_data);
  6.  
  7. for($i=0; $i<count($file_data); $i++){
  8.  
  9. $file=explode('||',$file_data[$i]);
  10.  
  11. echo( '<tr>
  12. <td width=\"175\" height=\"24\">&nbsp;<a href=\"http://' . $file['2'] . '/\" target=\"_blank\">' . $file['1'] . '</a></td>
  13. <td width=\"75\" height=\"24\" align=\"center\">' );
  14.  
  15. include( 'linki/klik/' . $file['1'] . '.txt' ); 
  16. echo('</td>
  17. </tr>');
  18.  
  19. }
  20.  
  21. ?>


..albo zainteresuj się funkcją eval


--------------------
www.calek.info
Go to the top of the page
+Quote Post
sajborg
post 28.08.2004, 15:19:35
Post #3





Grupa: Zarejestrowani
Postów: 271
Pomógł: 0
Dołączył: 20.08.2003
Skąd: Szczecinek

Ostrzeżenie: (0%)
-----


Po co takiem sposobem mozna tak

  1. <?
  2.  
  3. $file_name=&#092;"linki/data/data.php\";
  4. $file_data=file($file_name);
  5. $file_data=array_reverse($file_data);
  6.  
  7. for($i=0; $i<count($file_data); $i++){$file=explode('||',$file_data[$i]);
  8.  
  9. echo'<tr>
  10. <td width=\"175\" height=\"24\">&nbsp;<a href=\"http://'.$file['2'].'/\" target=\"_blank\">'.$file['1'].'</a></td>
  11. <td width=\"75\" height=\"24\" align=\"center\">'.include(&#092;"linki/klik/\".$file['1'].\".txt\").'</td>
  12. </tr>;}
  13.  
  14. ?>


Ten post edytował paweb 28.08.2004, 15:20:39


--------------------
Warsztat: gPHPEdit | Linux 2.6.17-11-generic (Ubuntu)
Sprzęt: Noteook BenQ A33E
___________________________________________________
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 17:04