Web Hosting Talk







View Full Version : Notepad++ wrecks php includes for me


closed office
04-07-2010, 03:47 PM
I really like Notepad++ and it is my favorite editor for everything texty.

I've been using a simple php include. <?php include("includes/nav.php");?> After uploading about 30 pages to a site, about 8 of them had no navigation. There was a space introduced between the semi colon and the ?.

Didn't know if it was an ftp problem or what but noticed lately that np++ keeps putting a space in there. That makes it quit working.

I don't know what the problem is. Should I be using a php editor like netbeans or ps pad? Or maybe I'm doing something else wrong with the include?

baffled

closed office
04-07-2010, 04:15 PM
rats, for some reason the edit button won't show for me now. Just got on the server and it looks like the space should be there. At least the last couple pages I tried worked, and had the space.

webhoststudent
04-07-2010, 08:53 PM
Having a space between the semi-colon and the question mark should not be breaking your php code. There is nothing wrong with having it there. Likewise there is nothing wrong with NOT having it there. Are you getting any errors? Check your error log, there must be some other problem.

closed office
04-07-2010, 09:01 PM
Yep it was just beginning to dawn on me that wasn't the problem. Thank you for the communication. Nice to have it confirmed. First time I did anything with php. (sigh)

Palmetto Innovations
04-10-2010, 05:26 AM
Have you tried using Aptana? If you haven't, take a look at 1.5 (the newest version makes you jump through hoops to use php). You may like it better and there are very few funny things I've found with it.

Also, webhoststudent is correct in that the spacing in that portion of the document should not matter. Glad you figured it out, though!