Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
|
|
URGENT! script that checks what day it is and displays a text file |
Page: 1 | Reply |
Sep 9th 2002 | #68384 Report |
Member since: Sep 3rd 2002 Posts: 22 |
hi how can i make it so it searches for the day of the week and displays a text file corresponding to that day? i used to no but i forget please help! its for a client and i only have a couple of days |
Reply with Quote Reply |
Sep 9th 2002 | #68402 Report |
Member since: Jun 30th 2001 Posts: 447 |
I don't think you can include files in JavaScript, so you'll have to use some sort of server-side script, like PHP. A sample PHP script is below: [php]$day = date('w'); switch ($day) { case 0: include 'sunday.txt'; break; case 1: include 'monday.txt'; break; case 2: include 'tueday.txt'; break; ....and so on to case 6, which is Saturday.... } ?>[/php] |
Reply with Quote Reply |
Page: 1 | Back to top |
Please login or register above to post in this forum |
© Web Media Network Limited. All rights reserved. No part of this website may be reproduced without written permission. Photoshop is a registered trademark of Adobe Inc.. TeamPhotoshop.com is not associated in any way with Adobe, nor is an offical Photoshop website. |