So i’m trying to include my custom php file w/ my functions in index.php like this: require_once(custom_directory/custom_file.php);
and i’m getting bunch of errors (PHP Fatal error: require_once(): Failed opening required ‘api/custom_directory/custom_file.php’ (include_path=’.:/usr/share/php’) in /var/www/site/api/index.php on line 3)
BUT if i’m including php file from the same directory as index.php then everything is fine.
Is it possible to fix this? Maybe it’s because of my .htaccess file?
My project structure:
---- vendor (slim is here)
---- custom_directory -> custom_file.php
---- index.php (i’m here)
My .htaccess file:
RewriteRule ^ index.php [QSA,L]