anushka Posted October 24, 2008 Share Posted October 24, 2008 i have two parent directory One is affiliate directory and another is XXX directory i want use the one file from Affiliate Directory in xxx how can i use Please can any one help me Quote Link to comment Share on other sites More sharing options...
anujgarg Posted October 24, 2008 Share Posted October 24, 2008 use ../ for moving from one directory to other or use the full path for the Affiliate Directory in XXX directory Quote Link to comment Share on other sites More sharing options...
anushka Posted October 24, 2008 Author Share Posted October 24, 2008 include(/public_html/affiliate/users."groups.php"); the groups.php is the file i want use.its located in affiliate/users folders is this syntax is correct Can u please tel Thanks a lot Quote Link to comment Share on other sites More sharing options...
anujgarg Posted October 24, 2008 Share Posted October 24, 2008 no need to write /public_html write ../affiliate/users/groups.php Quote Link to comment Share on other sites More sharing options...
anushka Posted October 24, 2008 Author Share Posted October 24, 2008 include('../affiliate/users/groups.php' ); when u this function i am getting all this errors Warning: include(../affiliate/users/groups.php) [function.include]: failed to open stream: No such file or directory in /home/mailsrig/public_html/mycity/listing/index.php on line 7 Warning: include(../affiliate/users/groups.php) [function.include]: failed to open stream: No such file or directory in /home/mailsrig/public_html/mycity/listing/index.php on line 7 Warning: include() [function.include]: Failed opening '../affiliate/users/groups.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mailsrig/public_html/mycity/listing/index.php on line 7 Warning: Cannot modify header information - headers already sent by (output started at /home/mailsrig/public_html/mycity/listing/index.php:7) in /home/mailsrig/public_html/mycity/layout/header.php on line 21 Warning: Cannot modify header information - headers already sent by (output started at /home/mailsrig/public_html/mycity/listing/index.php:7) in /home/mailsrig/public_html/mycity/layout/header.php on line 22 Warning: Cannot modify header information - headers already sent by (output started at /home/mailsrig/public_html/mycity/listing/index.php:7) in /home/mailsrig/public_html/mycity/layout/header.php on line 23 Warning: Cannot modify header information - headers already sent by (output started at /home/mailsrig/public_html/mycity/listing/index.php:7) in /home/mailsrig/public_html/mycity/layout/header.php on line 24 Warning: Cannot modify header information - headers already sent by (output started at /home/mailsrig/public_html/mycity/listing/index.php:7) in /home/mailsrig/public_html/mycity/layout/header.php on line 25 Quote Link to comment Share on other sites More sharing options...
valtido Posted October 24, 2008 Share Posted October 24, 2008 you will need two ../ so instead of include('../affiliate/users/groups.php' ); you need: include('../../affiliate/users/groups.php' ); because: index.php is two directories from the public_html remember ../ means go back one directory. putting include('../affiliate/users/groups.php' ); means you are looking for a file on the /home/mailsrig/public_html/mycity/affiliate/users/groups.php which ofcourse it isnt there so jus put this line on line seven include('../../affiliate/users/groups.php' ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.