PhP file read error
Go to solution
Solved by Brenz,
You are only using a single equals sign, this means you are trying to set
fread($currentStream,filesize("control/current.txt"))
to be netflix which obviously you cannot do.
In an IF statement you can either use two or three equals signs.
Two will compare ignoring the case so an integer could equal a string like 2 == '2'.
Three will only be true if the type and value match so 2 === 2 is true, 2 === '2' is false and '2' === '2' would be true.
Then your string needs to be wrapped in quotes or it won't work.
So in your case it should be:
if (fread($currentStream,filesize("control/current.txt")) === "netflix") ?>
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now