i have 2 folders folder1 folder2 in folder i have theme.php in folder 2 i have index.php how can i call theme.php (in folder 1) in index.php (in folder2)? i have used domain.com/folder1/theme.php in index.php( in folder 2) but it doesnt works, becuase it cant read php files in browser i have tried /public_html/nevret/folder1/theme.php, but then it makes it domain.com/public_html/nevret/folder1/theme.php how can i do this? thnx very much,
i have not only theme.ph i have like theme.php wp.php imag.php all in index.php how can i let them all see where they are in folder1?
You need to continue listing the includes <?php include '/folder1/theme.php' ; include '/folder1/wp.php' ; include '/folder1/imag.php' ; ?> Code (markup):
Bagi Zoltán has it. You can't use an url to include files, you must use a machine path. Another method would be like this: require ("folder1/imag.php") ; or require_once("folder1/imag.php") ;
but if i use: include '/folder1/theme.php' ; include '/folder1/wp.php' ; include '/folder1/imag.php' ; Code (markup): and i put this in the pgh file in folder2, it will read as: /folder2/folder1/theme.php /folder2/folder1/wp.php
Try this include './folder1/theme.php' ; include './folder1/wp.php' ; include './folder1/imag.php' ; Code (markup):
Warning: require_once(/home/nevret/public_html/yourdepo/god/2/wp-includes/classes.php) [function.require-once]: failed to open stream: No such file or directory in /home/nevret/public_html/yourdepo/god/2/wp-blog-header.php on line 8 Fatal error: require_once() [function.require]: Failed opening required '/home/nevret/public_html/yourdepo/god/2/wp-includes/classes.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nevret/public_html/yourdepo/god/2/wp-blog-header.php on line 8