View Single Post
Old 02-03-2013, 02:45 PM   PM User | #22
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
If its working, it much further ahead yeah.
This won't work, at least not the way it's supposed to: if ($sStatus == 01). It *will* work because of PHP's datatype weakness, but it won't work logically since you are comparing a string '01' to octal 01. With the datatype weakness this compares 1 to 1. I'd suggest keeping them as string comparisons though.
I'd also still use the is_file check, but provide a hard coded alternative path for just in case it cannot find the file you have specified.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
iman (02-04-2013)