PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
directory : [Messages]
[Messages] contains PHP files
[HTML] contains HTML file + 1 PHP file (Home.PHP)
Home.php contains two lines which tries to include files in [Messages]
include "../messages/file1.php";
include "../messages/file2.php";
this works perfectly on my windows Apache but once uploaded to my server it says it failed to include it! .. any ideas why????
M
It should work - but it's really safer to add the full path on *nix. You probably know what that is but if not - it's the path from the base dir. For example on Mac OS X the path is /Library/WebServer/Documents
include "../Messages/file1.php";
include "../Messages/file2.php";
Keeping all file names and directory names lower case is a good idea when you'll be testing on a Windows machine and uploading to a *nix one as it means less issues with case sensitivity.