Problem to perform require of a file

Asked

Viewed 44 times

0

Este é o erro

Este é o meu código

This is my error and code respectively. I can do include in other files, only in config.php that not!

Someone has a solution?

NOTE: It is worth mentioning that I already tried to take out the '.;' that is ahead of the 'C: '. And I have no path to C: php let alone C: php Pear.

Thank you!

  • Do not put images, in this case you can leave the error but put php even in writing sff. Welcome

  • I don’t have the Pear installed. Miguel, thank you, I’m a beginner :D

1 answer

0


After a while I spent here, had already solved, but I will put the answer to those who have not found solution yet.

define('BASE_URL', 'http://localhost/imob/');
//este funciona
require_once('../helpers/functions.php');
//este não funciona
require_once(str_replace('http://', '', BASE_URL).'restrito/helpers/functions.php');
  • config.php is: localhost/imob/restrito/config/config.php
  • functions.php is: localhost/imob/restrict/helpers/functions.php

Browser other questions tagged

You are not signed in. Login or sign up in order to post.