Jump to content

Recommended Posts

Thanks for looking..

 

I have a database that stores a few bits of info and then an URL for a file to be executed.

 

Here's an example of a row from it..

 

name = BoxOfTricks

Cost = 2000

Pic = images/boxoftricks.gif

fileurl = items/boxoftricks.php

 

 

but when i pull the fileurl into a variable I can't seem to use that to make it include the file..

 

$itemFile = mysql_result($result,0,"fileurl");

include '$itemFile';

 

the itemFile variable prints out fine.. but i get these errors:

 

Warning: main($itemFile): failed to open stream: No such file or directory in stygian/itemLauncher.php on line 31

 

Warning: main(): Failed opening '$itemFile' for inclusion (include_path='.:/usr/local/lib/php/') in stygian/itemLauncher.php on line 31

 

Is what I'm trying even possible?

Link to comment
https://forums.phpfreaks.com/topic/50754-how-to-include-using-variables/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.