PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$date = date('l');
//Let's concatenating the day of the week and '.html' into one variable for ease of use
$page = 'schedule/'.strtolower(date('l')).'.html';
//This checks to see if the filename exists in the current directory.
//If it does, it pulls the page up. If not, it pulls up a default page.
if (file_exists($page)){
include($page);
} else {
include('default.html');
}
?>
I'm working with Confusion on this project - Basically we have a file called Schedule.php - This file contains the lump of code that calls the daily html files up and is located in the public_html folder. Coming off that folder we have a directory called /Schedule/ which contains all the daily html files.
We would like to edit the php script to call from the /schedule/ folder instead of the folder that houses schedule.php