Sto iniziando...
scusatemi...
Al primo include già va tutto a scatafascio
Codice PHP:
<?php include "rgnclock";?>
e lo script....
Codice PHP:
<?php
/*
RGNClock
Version 1.0
*/
$twentyfourhours = "off"; // Set to "on" if you would like 24x7 Hours such as
// 15:00 Hours. The default is AM\PM
$giflocation = "http://localhost/clock/"; // This is where your GIF files are located
// Remember to include the trailing slash
// get the current time of server
$time_stamp = getdate();
// calculate hour to display
if($twentyfourhours == "on") // whether to display 24x7, if true, convert
$hour = date ("H"); //24x7 hours
else
$hour = date ("g"); //12 hours
// calculate minutes to display
$minutes = date ("i");
// display hours
if(strlen(strval($hour)) < 2){
echo "<IMG SRC=\"".$giflocation.$hour.".gif"."\">";}
else{
echo "<IMG SRC=\"".$giflocation.substr($hour, 0, 1).".gif"."\">";
echo "<IMG SRC=\"".$giflocation.substr($hour, 1, 1).".gif"."\">";
}
// display colon
echo "<IMG SRC=\"".$giflocation."colon.gif"."\">";
// display minutes
echo "<IMG SRC=\"".$giflocation.substr($minutes, 0, 1).".gif"."\">";
echo "<IMG SRC=\"".$giflocation.substr($minutes, 1, 1).".gif"."\">";
// whether to display AM PM or not
if($twentyfourhours != "on"){ // if true, will display AM or PM
if(date("A") == "AM")
echo "<IMG SRC=\"".$giflocation."am.gif"."\">";
else
echo "<IMG SRC=\"".$giflocation."pm.gif"."\">";
}
All'esecuzione: http://localhost/clock/
ottengo:
Warning: include(rgnclock) [function.include]: failed to open stream: No such file or directory in C:\WWW\clock\index.php on line 1
Warning: include() [function.include]: Failed opening 'rgnclock' for inclusion (include_path='.;c:\php\includes') in C:\WWW\clock\index.php on line 1
Naturalmente è tutto su http://localhost/clock/
Credo che sia una questione di parametri PHP.ini o Apache
ma non so dove mettere le mani
Purtroppo con il search non ho combinato molto... grazie per l'aiuto