Re: [PHP] include (foo.php) not working
I am running PHP 4.0.6 on my Mac OSX using apache and MySQL. when I include the statement ? include (foo.php); ? then rather than parsing the file and displaying the results the whole file is just dumped to screen as a text file. Interesting the same problem occurs whatever the file extension so the same thing happens for foo.htm, foo.html and foo.txt! Jon Make sure you have Unix line endings on the file, rather than Mac (if you are using BBedit - which I heartily recommend - you can change this in the preferences and from the pop-up menu just below the title bar). I had the same problem the other day and that solved it for me. Regards -- Andy Warwick email: [EMAIL PROTECTED] PGP ID: 0xB1D73499 Creed New Media Designtel: 07976 205085 Nottingham, England url: http://www.creed.co.uk website production - internet programming - new media consultancy cdrom multimedia - graphic design - digital image retouching -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include (foo.php) not working
when I include the statement ? include (foo.php); ? then rather than parsing the file and displaying the results the whole file is just dumped to screen as a text file. Interesting the same problem occurs whatever the file extension so the same thing happens for foo.htm, foo.html and foo.txt! From PHP manual: The require() statement replaces itself with the specified file, much like the C preprocessor's #include works. -- - Castus Ilarius, Magister Ludi Machinationis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] include (foo.php) not working
Errr... feel embaressed asking but I've done the same... You do have ?php ? tags around your code? Easy to leave off when there's no HTML in the page. Matt Ilari Kaartinen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... when I include the statement ? include (foo.php); ? then rather than parsing the file and displaying the results the whole file is just dumped to screen as a text file. Interesting the same problem occurs whatever the file extension so the same thing happens for foo.htm, foo.html and foo.txt! From PHP manual: The require() statement replaces itself with the specified file, much like the C preprocessor's #include works. -- - Castus Ilarius, Magister Ludi Machinationis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] include (foo.php) not working
I've found that when I forget to start and end the include file's code with ? and ? it sometimes does exactly what you're getting. Regards Rudolf -Original Message- From: Jon Hubbard [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 01:42 To: [EMAIL PROTECTED] Subject: [PHP] include (foo.php) not working I have a strange problem which I cannot seem to resolve. I am running PHP 4.0.6 on my Mac OSX using apache and MySQL. Everything works fine except for one problem. Like many developers I make extensive use of the include funtion but it does not seem to work correctly on this installation. when I include the statement ? include (foo.php); ? then rather than parsing the file and displaying the results the whole file is just dumped to screen as a text file. Interesting the same problem occurs whatever the file extension so the same thing happens for foo.htm, foo.html and foo.txt! I do not get this problem with my SUSE Linux 7.1 box which is also running PHP, Apache and MySQL. I did compile and make the PHP from the source. Your help and advice would be much appreciated. TIA Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]