How can I generate an include with a random number inside it?
I want to include divs for promotions, adverts, random site content and so on. The method I'd thought of is this: include them using random numbers. So I'd eventually want to generate something like:
Code:
include("promo-column/promo-1.php")
where the 1 could be between two set numbers, randomly chosen on page load. I understand how to generate a random number (i.e.
Code:
echo 'whatever-', rand(1, 5);
but I don't know the syntax to have that happen...
This must be a really basic problem for almost every site out there.
How can I get includes to work for subdirectories (i.e. mysite.com/subdirectory/file.php) when all of my includes are stored in a /includes folder off the root directory? I've been Googling and have come across dozens of cryptic solutions.
It would be great if it was a .htaccess thing, because I can foresee that being the simplest way. That way, you...
I've recently started changing a site from plain ol' html to php, so that I can use includes for headers, footers and so on, and also so that in the future dynamically creating pages won't be a problem.
I have includes working a-okay at the moment for files in the root directory, i.e. in http://buddingpress.co.uk/sitemap.php I have three functional includes, all basically...
hi
anybody help me about html server side include. i want to insert another html file into one main html file ex: header, footer and menubar etc. i tried with google and get some process. but that is not appearing. if possible anybody give me step by step process.
thank you