Jump to content

Archived

This topic is now archived and is closed to further replies.

marcus1060

include php from mysql

Recommended Posts

Show us your code. Immediate thoughts:

Have you started with <?php ?

Is the page name xxx.php ?

Have you sent headers?

 

Share this post


Link to post
Share on other sites

[!--quoteo(post=322412:date=Nov 27 2005, 03:34 AM:name=virtual_odin)--][div class=\'quotetop\']QUOTE(virtual_odin @ Nov 27 2005, 03:34 AM) 322412[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Show us your code. Immediate thoughts:

Have you started with <?php ?

Is the page name xxx.php ?

Have you sent headers?

 

<?php: yes

xxx.php: yes

headers: no

 

The data is taken from mysql into a variable,

and then echoed:

echo "\n $summary";

 

I'm thinking the echo is the problem...

Share this post


Link to post
Share on other sites

[!--quoteo(post=322893:date=Nov 28 2005, 06:14 PM:name=marcus1060)--][div class=\'quotetop\']QUOTE(marcus1060 @ Nov 28 2005, 06:14 PM) 322893[/snapback][/div][div class=\'quotemain\'][!--quotec--]

<?php: yes

xxx.php: yes

headers: no

 

The data is taken from mysql into a variable,

and then echoed:

echo "\n $summary";

 

I'm thinking the echo is the problem...

 

Try this.

echo $summary ."\n";

Share this post


Link to post
Share on other sites

That makes sense I'll give it a try.

 

Edit: Nope, doesn't work...

I'm thinking it might actually be some type of security thing I need to disable?

Share this post


Link to post
Share on other sites

Another xxx.php page displays correctly, yes?

 

Could it be that some of your global options are getting in the way? run PHP() and look at magic_quotes_gpc. I have just run up a test page and it works fine on my set up. magic_quotes ar off in my set up.

 

Also, try dropping the quotes and the \n and just echo the variable.

Share this post


Link to post
Share on other sites

[!--quoteo(post=324173:date=Dec 3 2005, 09:57 AM:name=virtual_odin)--][div class=\'quotetop\']QUOTE(virtual_odin @ Dec 3 2005, 09:57 AM) 324173[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Another xxx.php page displays correctly, yes?

 

Could it be that some of your global options are getting in the way? run PHP() and look at magic_quotes_gpc. I have just run up a test page and it works fine on my set up. magic_quotes ar off in my set up.

 

Also, try dropping the quotes and the \n and just echo the variable.

Another xxx.php page displays correctly, yes?: yes

 

magic_quotes_gpc:

Had em on didn't work, had em off didn't work.

 

[a href=\"http://noveis.net/?page=php\" target=\"_blank\"]http://noveis.net/?page=php[/a] to see my php()

 

[a href=\"http://noveis.net/\" target=\"_blank\"]http://noveis.net/[/a] and view the source you'll see some php in the top article.

 

removing ."\n": no dice

Share this post


Link to post
Share on other sites

Could it be some nesting going on? Is your displayed bit of php within a string being echoed. I think this would achieve the result you are getting. You'd need to close the echo with "; before php would look for the next command otherwise it will just assume it is part of the echo.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.