We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e27461b + f859748 commit 3ed6b77Copy full SHA for 3ed6b77
ThinkPHP/Library/Org/Net/IpLocation.class.php
@@ -54,7 +54,10 @@ class IpLocation
54
public function __construct($filename = "UTFWry.dat")
55
{
56
$this->fp = 0;
57
- if (($this->fp = fopen(dirname(__FILE__) . '/' . $filename, 'rb')) !== false) {
+ if(!is_file($filename)) {
58
+ $filename = dirname(__FILE__) . '/' . $filename;
59
+ }
60
+ if (($this->fp = fopen($filename, 'rb')) !== false) {
61
$this->firstip = $this->getlong();
62
$this->lastip = $this->getlong();
63
$this->totalip = ($this->lastip - $this->firstip) / 7;
0 commit comments