Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> include w echo, wyciaganie include z mysqla
mablo
post
Post #1





Grupa: Zarejestrowani
Postów: 120
Pomógł: 1
Dołączył: 11.04.2005
Skąd: Poznań

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


Mam problem. W tabeli mysql mam :
Kod
echo \"<br /><div align="center">\";
include "includes/modules/licznik/licznik.php";
include "includes/modules/licznik_online/liczsadnik.php";
echo "<br /><br />";

potrzebuje wyciągnąc wynik z
Kod
include "includes/modules/licznik/licznik.php";

ale jak zrobie echo to pokazuje mi tylko
  1. include "includes/modules/licznik/licznik.php";
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
hwao
post
Post #2


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




eval" title="Zobacz w manualu PHP" target="_manual()

  1. <?php
  2.  
  3. eval( 'echo \"Witam w Eval :)\";' );
  4.  
  5. ?>
Go to the top of the page
+Quote Post
mablo
post
Post #3





Grupa: Zarejestrowani
Postów: 120
Pomógł: 1
Dołączył: 11.04.2005
Skąd: Poznań

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


Fajnie ze jest na to sposób ale jak mam wstawic " ' ` (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Bo jak zrobie tak:
  1. <?php
  2. eval(`echo $sqllist['tresc'];`);
  3. ?>

To wyskakuj mi error:
Kod
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
Go to the top of the page
+Quote Post
aleksander
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 742
Pomógł: 0
Dołączył: 14.12.2003
Skąd: Gdańsk, Trójmiasto

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


  1. <?php
  2. eval( &#092;"echo $sqllist['tresc'];\" );
  3. ?>
Go to the top of the page
+Quote Post
mablo
post
Post #5





Grupa: Zarejestrowani
Postów: 120
Pomógł: 1
Dołączył: 11.04.2005
Skąd: Poznań

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


Nadal nic cały czas ten sam błąd.

Już działa. Ale eval() zwraca mi jeszcze liczbe 1 niewiem z kąd. Jakieś pomysły (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował mablo 30.04.2005, 22:55:03
Go to the top of the page
+Quote Post
ActivePlayer
post
Post #6





Grupa: Przyjaciele php.pl
Postów: 1 224
Pomógł: 40
Dołączył: 6.07.2004
Skąd: Wuppertal

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


a nie piszesz przypadkiem
  1. <?php
  2. echo eval(...);
  3. ?>
(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
hwao
post
Post #7


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




http://www.php.net/eval (IMG:http://forum.php.pl/style_emoticons/default/axesmiley.png)

Cytat
A return statement will terminate the evaluation of the string immediately. As of php 4, eval() returns NULL unless return is called in the evaluated code, in which case the value passed to return is returned. In case of a parse error in the evaluated code, eval() returns FALSE. In case of a fatal error in the evaluated code, the whole script exits. In php 3, eval() does not return a value.
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 22.08.2025 - 18:46