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)
-   -   BRAIN FART! Stupid PHP question... (https://gfy.com/showthread.php?t=403133)

XSAXS 12-15-2004 08:13 AM

BRAIN FART! Stupid PHP question...
 
Trying to include a php script into a page *after* it's already been parsed. This doesn't work because it just inserts the raw php code:

PHP Code:

<?php  
include('script.php');  
?>

I need to run the script first and then have it inserted into the page. Who know the trick?

retro 12-15-2004 08:17 AM

Huh?

Try an iframe maybe?

Lycanthrope 12-15-2004 08:20 AM

Que?

XSAXS 12-15-2004 08:23 AM

yeah, I thought about an iframe, but I know I've seen this done before.

psili 12-15-2004 08:30 AM

Can you use the "eval()" function to evaluate the raw PHP code ???

StuartD 12-15-2004 08:34 AM

Quote:

Originally posted by psili
Can you use the "eval()" function to evaluate the raw PHP code ???
bingo :thumbsup

EscortDate_Enoj 12-15-2004 08:59 AM

You could do a ..

PHP Code:

<?php

$parsed_file 
file_get_contents('http://myserver.com/script.php');

?>

Kind of nasty, but hey, eval() is nasty too.


All times are GMT -7. The time now is 12:15 PM.

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