webgyrl Posted February 27, 2005 Posted February 27, 2005 I'm trying to get a countdown script to work on a page I am working on. I keep getting an error that states: Fatal error: Call to undefined function: countdown() in /home/indiema/public_html/count.htm on line 19 I've followed these directions and uploaded the files: Installation Instructions 1. Upload offset.php to a directory in your web space. 2. Navigate to offset.php in your browser to determine the difference between your local time and the server time. 3. Open cdown.php in a text editor and change the offset value you obtained in the previous step. 4. Upload cdown.php to a directory in your web space. Usage Instructions Tip: Look at the source code of demo.php for usage examples. Step 1: Add the following code to any page that you want to put a countdown on. This should only be included once per page, and must come before any countdowns. <? include('path/to/cdown.php'); ?> path/to/: The relative path to cdown.php from the page you're adding this code to. If they are in the same folder, simply use 'cdown.php'. Step 2: Add the following code to any page to create a countdown. You can have multiple countdowns per page, but they must come after the code in the previous step. <? countdown(D, yyyy, mm, dd, hh, mm, ss); ?> D: A number from 1-5 indicating how much detail your countdown should show. * 1: Show only years left. * 2: Show years, days left. * 3: Show years, days, and hours left. * 4: Show years, days, hours, and minutes left. * 5: Show years, days, hours, minutes, and seconds left. yyyy: 4-digit year between 1970 and 2038. mm: Month; need not having a leading zero (e.g. March = 3). dd, hh, mm, ss: Day of the month, hour, minute, and second respectively; need not having a leading zero (e.g. 9) Tip: Hour must be in 24-hour time (e.g. 6pm = 18). All parameters are optional EXCEPT for the detail level and the year. Here is my page code: Link: http://www.indiemanagers.com/count.htm ><? include('http://www.indiemanagers.com/countdown/cdown.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="Description" content="The Indie Managers Association (IMA) provides a unique opportunity for independent music managers to exchange ideas, suggestions and opinions amongst themselves and others on issues surrounding their independent community." /> <meta name="Keywords" content="IMA, Indie Managers Association, Music, Music Manager, IMMA, Independent Music Managers Association, Managers, Management, Music, Independent Managers, Managers Association, Management Association, Music Organizations, Music Managers, Personal Managers, Road Managers, Tour Managers, IMMA, Music Conferences, Music Books, Music Directory" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" media="screen" href="http://www.indiemanagers.com/styles/main.css" /> <title>The Indie Managers Association **RE-LAUNCHING SOON**</title> </head> <body> <p> </p> <table width="760" border="5" align="center" cellpadding="0" cellspacing="0" bordercolor="#cc9999"> <tr> <td valign="top"><p align="center"><a href="http://www.indiemanagers.com" target="_parent"><img src="layout/masthead.jpg" alt="Click Here to Go to the IMA Home Page" width="740" height="146" border="0"></a> <center> <? countdown(5, 2005, 3, 6, 0, 0, 0); ?> until the re-launch of the Indie Managers Association! </center> </p> </td> </tr> </table> </body> </html> Any ideas as to what I did wrong? Quote
TCH-Bruce Posted February 27, 2005 Posted February 27, 2005 Nat, your include is incorrect. ><? include('http://www.indiemanagers.com/countdown/cdown.php'); ?> It should be ><? include('/countdown/cdown.php'); ?> Or ><? include('countdown/cdown.php'); ?> Quote
TCH-Don Posted February 27, 2005 Posted February 27, 2005 And you really should use the long form of php to start a php statement ><?php Quote
webgyrl Posted February 27, 2005 Author Posted February 27, 2005 Bruce and Don! Thanks for the help! I got it to work! Nat Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.