![]() |
PHP help please...
I want to include main_content.php in this...it is from oscommerce, the includes/language/english/index.php file...how can I set a php as an include in this, it is not letting me
the <?php include("main_content.php"); ?> is what I am trying to include...do I have to have a different code when I am already on a php page? like an echo or something? Code:
define('TEXT_MAIN', '' . tep_image(DIR_WS_IMAGES . 'default/greeting.jpg') . '<hr width="375" size="1" color="#000000"><br><?php include("main_content.php"); ?>'); |
Your include statement is correct. But without seeing the start of your code, it's tough to see where you're going wrong.
|
here is the entire page
Code:
<?php |
it doesn't look like your include is wrong. Either some code before it is incorrect or some code on the php page you are trying to include is fucked.
|
and it is just showing up like this
http://www.ecstasyglass.com/ and I need this http://www.ecstasyglass.com/main_content.php to be included in the part I have added it to in the code |
Hey Jace...
I don't see where this is outputting anything. It looks like this is just defining shit. I don't know forsure though. What I would do is add the include after the end of the if() loop. |
Your code:
define('TEXT_MAIN', '' . tep_image(DIR_WS_IMAGES . 'default/greeting.jpg') . '<hr width="375" size="1" color="#000000"><br><?php include("main_content.php"); ?>'); Try this instead: define('TEXT_MAIN', '' . tep_image(DIR_WS_IMAGES . 'default/greeting.jpg') . '<hr width="375" size="1" color="#000000"><br>'.include("main_content.php")) ; |
you can't have "<?php" tags nested within each other.
the include() function should be applied the same way as tep_image() there with concatenation periods around it .include(). simple example: $var = "Hi my name " . get_name() . " whats up?"; or $var = "Hi my name " . get_name(); |
yah getting rid of the <?php
may help since it's already in a <? tag from the top |
trying now
|
Quote:
. tep_include('main_content.php') . ? |
Quote:
define('TEXT_MAIN', '' . tep_image(DIR_WS_IMAGES . 'default/greeting.jpg') . '<hr width="375" size="1" color="#000000"><br>'.include("main_content.php")) ; |
Quote:
|
where do you want include main_content.php, as part of define('TEXT_MAIN' ... ?
|
Quote:
|
Quote:
nope, it is straight html |
i just basically want that index.php page to call main_content.php and it show up in the text_main
|
| All times are GMT -7. The time now is 11:52 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123