Jump to content

I need a SIMPLE random file include script - any ideas???


JetJagger

Recommended Posts

I need a script that will allow me to include random 'php includes' in my site, but I am having trouble finding one that works as advertised.

 

The script simply need to allow me to create add various 'php includes' to an array, then I need another string of code that can be inserted into my Web page to pull-in the 'php includes' in the array.  For example:

 

ARRAY FILE (Loosely-based on reality)...

 

 

(arrayfile.php)

[1] <?php include('http://whateverfilefromanywhere01.php'); ?>

[2] <?php include('http://whateverfilefromanywhere02.php'); ?>

[3] <?php include('http://whateverfilefromanywhere03.php'); ?>

 

 

THEN THE INCLUDE THAT GOES INTO THE WEB PAGE....

 

(embedded inside Web page)

<?php include('http://arrayfilepath.php"); ?>

 

 

That's it!  Keep in mind, I DO NOT need a 'random image' script.  There are hundreds of those.  What I need is a script that INCLUDES whatever objects or content found in the 'php include' files in the array.  These might be images, text, or HTML strings.

 

I don't know why this script is so hard to locate on the Web!

 

Help.

 

 

Link to comment
Share on other sites

STATUS:

 

Okay, they all worked, and I actually found many of those scripts online already.  My problem was that I was trying to separate-out the 'echo' or 'array include' portion of the script (so that the file path portion was a stand-alone file).  Well, I didn't need to do that since I could just include the whole dang script with a basic include string.

 

DUH!  DUH!  DUH!

 

Anyway...  Thanks to all for such quick responses to this embarrassingly simply question.

 

Three hours wasted on 'trying to hard'.  LOL.

Link to comment
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.