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 question, using a function inside an include? (https://gfy.com/showthread.php?t=544047)

chadglni 11-24-2005 08:33 AM

PHP question, using a function inside an include?
 
Can anyone tell me real quick how to make a function work within an include?

Include is formatted like:

<? include 'http://www.site.com/folder/file.php?FILE=http://www.site2.com/folder/REPLACE.php&TEMPLATE=template.html'; ?>

Need to add a ($function) where it says REPLACE which of course currently spells out the funtion instead of inserting the correct data. Easy way to stop this?

woj 11-24-2005 08:38 AM

use double quotes instead:
<? include("http://www.site.com/folder/file.php?FILE=http://www.site2.com/folder/$function.php&TEMPLATE=template.html"); ?>

By the way, whatever you trying to do, it doesn't look like the best way of doing things...

ssp 11-24-2005 08:43 AM

How about?

<?

1.) function here
2.) store end result in variable
3.) include variable

?>

chadglni 11-24-2005 08:49 AM

Quote:

Originally Posted by woj
use double quotes instead:
<? include("http://www.site.com/folder/file.php?FILE=http://www.site2.com/folder/$function.php&TEMPLATE=template.html"); ?>

By the way, whatever you trying to do, it doesn't look like the best way of doing things...

Thanks, and yeah it's horrible. It needs to be custom coded but I'm rigging up a demo for an investor before we do a custom job.


All times are GMT -7. The time now is 07:19 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123