← Desenvolvimento

script dia1->1.php

Lida 3720 vezes

Offline

asturmas 
Administrador
Mensagens 19734 Gostos 50
Feedback +2

Troféus totais: 39
Trófeus: (Ver todos)
Mobile User Windows User Super Combination Combination Topic Starter 100 Poll Votes 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Isso e mto interesante  :lol:
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Andam a pesquisar bem   :lol:
Offline

=IceBurn= 
Membro
Mensagens 897 Gostos 3
Feedback +3

Troféus totais: 32
Trófeus: (Ver todos)
Windows User Level 6 Linux User Mobile User Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5

Citação de: "SSPT"
Ou ainda:

Código: [Seleccione]

<?php

$file 
date&#40;"j"&#41; . ".php";

if&#40;!file_exists&#40;$file&#41;&#41;
&#123;
include&#40;$file&#41;;
&#125;
else
&
#123;
   
echo "Não existe um ficheiro específico para hoje.";
&
#125;

?>


Desculpa lá, mas não tens aí um NOT (!) a mais??
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Pois..bem visto =IceBurn=!

Ali a função if só vai incluir o ficheiro caso ele não exista.. :|