mercredi 30 novembre 2016

php if else works except copying file

Hi I have a simple if else which works on both conditions, however if one condition involves copying a file then it is executed in either condition, can someone help?

<?php
if ($_GET["status"] <> "done") {
echo "match is in progress";
} else {
echo "match is ended";
copy("source.txt","target.txt");
}
?>

The echo function works correctly on a given "status" value, but copy("source.txt","target.txt"); still executes no matter what the status is given......

Aucun commentaire:

Enregistrer un commentaire