Reputation: 657
How can I set a default path for files?
What i mean that if i have this address for exapmle:
http://www.mysite.com/example/example2
for the file example.php
.
And I have include function in example.php. lets say, include('a.php');
Its looking for http://www.mysite.com/example/example2/a.php. I need it to look for http://www.mysite.com/a.php
Thank you!
Upvotes: 0
Views: 51
Reputation: 523
Add below code in .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^(.*)$ example/example2/a.php
</IfModule>
Upvotes: 2
Reputation: 785481
You can add this line in your DOCUMENT_ROOT/.htaccess
:
php_value include_path "/full/path/to/Document/Root:."
to set include path that will let you include file as include('a.php');
Upvotes: 0