0

I have a Yii MVC App. When running the app under Windows OS, the app locates and uses the needed file.

I now have 2 OS's, Linux OS's and, on one, my app finds and uses the file, and on another, it fails.

$this->font1 = Yii::app()->baseUrl . '/protected/extensions/TextFigletCaptcha/flf/' . $this->font1 . '.flf';
if (!file_exists($this->font1)) {
throw new Exception('Font file not found!<br/>');
}

What's happening ?

Ionut Flavius Pogacian
  • 4,750
  • 14
  • 58
  • 100

1 Answers1

0

I found the answer to my question:

$this->font1 = Yii::app()->getBasePath(true) . '/extensions/TextFigletCaptcha/flf/' . $this->font1 . '.flf';
Ionut Flavius Pogacian
  • 4,750
  • 14
  • 58
  • 100