I need to include a php file to one of my file.
I have a php file like http://www.example.com/free/index.php.
I need to include another php file from this directory http://www.example.com/downloads/apple_count.php
I wrote this code inside that index.php page
<?php
include('..\downloads/apple_count.php');
?>
But it’s not working. 🙁 It says Warning: include(..\downloads/apple_count.php) [function.include]: failed to open stream: No such file or directory.....
Please help me to do this 🙁
php on windows or linux?
if you are constantly including out of the same file you could use
either way you need to flip that ..\ into a ../