GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP help please... (https://gfy.com/showthread.php?t=486252)

Jace 06-28-2005 02:10 PM

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"); ?>');

Robx 06-28-2005 02:29 PM

Your include statement is correct. But without seeing the start of your code, it's tough to see where you're going wrong.

Jace 06-28-2005 02:32 PM

here is the entire page

Code:

<?php
/*
  $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

define('TEXT_MAIN', '' . tep_image(DIR_WS_IMAGES . 'default/greeting.jpg') . '<hr width="375" size="1" color="#000000"><br><?php include("main_content.php"); ?>');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

if ( ($category_depth hahahaha 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
  define('HEADING_TITLE', '');
  define('TABLE_HEADING_IMAGE', '');
  define('TABLE_HEADING_MODEL', 'Model');
  define('TABLE_HEADING_PRODUCTS', 'Product Name');
  define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
  define('TABLE_HEADING_QUANTITY', 'Quantity');
  define('TABLE_HEADING_PRICE', 'Price');
  define('TABLE_HEADING_WEIGHT', 'Weight');
  define('TABLE_HEADING_BUY_NOW', 'Buy Now');
  define('TEXT_NO_PRODUCTS', 'Sorry, there there is nothing here yet!.');
  define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
  define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
  define('TEXT_SHOW', '<b>Show:</b>');
  define('TEXT_BUY', 'Buy 1 \'');
  define('TEXT_NOW', '\' now');
  define('TEXT_ALL_CATEGORIES', 'All Categories');
  define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth hahahaha 'top') {
  define('HEADING_TITLE', '');
} elseif ($category_depth hahahaha 'nested') {
  define('HEADING_TITLE', 'Categories');
}
?>


Azlord 06-28-2005 02:33 PM

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.

Jace 06-28-2005 02:34 PM

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

Azlord 06-28-2005 02:44 PM

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.

Serge Litehead 06-28-2005 02:57 PM

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")) ;

Serge Litehead 06-28-2005 03:08 PM

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();

Azlord 06-28-2005 03:09 PM

yah getting rid of the <?php
may help since it's already in a <? tag from the top

Jace 06-28-2005 03:14 PM

trying now

Jace 06-28-2005 03:18 PM

Quote:

Originally Posted by holograph
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();

ok, so it should be

. tep_include('main_content.php') .

?

Serge Litehead 06-28-2005 03:19 PM

Quote:

Originally Posted by JaceXXX
ok, so it should be

. tep_include('main_content.php') .

?

no, sorry for the confusion, here is the correct line:
define('TEXT_MAIN', '' . tep_image(DIR_WS_IMAGES . 'default/greeting.jpg') . '<hr width="375" size="1" color="#000000"><br>'.include("main_content.php")) ;

Jace 06-28-2005 03:20 PM

Quote:

Originally Posted by holograph
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")) ;

all that did was make the entire www.ecstasyglass.com show up as the main_content.php

Serge Litehead 06-28-2005 03:26 PM

where do you want include main_content.php, as part of define('TEXT_MAIN' ... ?

Serge Litehead 06-28-2005 03:28 PM

Quote:

Originally Posted by holograph
where do you want include main_content.php, as part of define('TEXT_MAIN' ... ?

does main_content.php have any print or echo functions in there?

Jace 06-28-2005 03:39 PM

Quote:

Originally Posted by holograph
does main_content.php have any print or echo functions in there?


nope, it is straight html

Jace 06-28-2005 03:40 PM

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