A
A
Archakov Dennis2015-11-08 13:59:11
PHP
Archakov Dennis, 2015-11-08 13:59:11

How to connect a script from the main domain to a subdomain?

There was such a problem, I want to connect a script from the main domain in a subdomain.
There are api.site.ru and site.ru folders . The API folder contains index.php, which should include classes from the main domain. I get the api folder path:
dirname ( __FILE__ )
and just remove the api. . The path goes straight to the main folder, but for some reason I can't access the files.

Warning: include(/home/f/user123/test.io/public_html/engine/classes/mysql.class.php): failed to open stream: Permission denied in /home/f/user123/api.test.io/public_html/index.php on line 22

I set the rights to 777 on the folders, but nothing is the same!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Latyshev, 2015-11-08
@archakov06

As an option, change the open_basedir settings to '/home/f/user123/'

S
Sergey, 2015-11-08
@gangstarcj

Make a symbolic link to the folder with the desired files, this folder can be accessed as a normal one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question