View Full Version : index.php not working
rororo
September 10th, 2008, 08:37 AM
hey all... strange issue...
i have built a site based on php. i'm using includes for the headers, footers, etc. everything works well except for the homepage (index.php). it doesn't want to execute any php script... not includes, no simple echo.... nothing...
it doesn't work on my local server setup (xampp) and not online.
anything?
thanks!
Templarian
September 10th, 2008, 08:57 AM
"<?" or "<?php", first of all make sure you always using "<?php"
Double check that your other php files are "working". Is it just index.php or blah.php wouldn't work either?
Other than that we can't really tell without seeing the script as its probably a typo error (although any php syntax highlighter would show that right away so doubtful).
rororo
September 10th, 2008, 09:07 AM
hey,
this is the script that i'm using - even a simple one like this:
<?php
echo "This is a Test!";
php?>other scripts work just fine on all other pages except for this one (which happens to be the homepage - index.php)
when i look at the source of the page, i just see the script there - when it's not supposed to be.... so maybe for some reason this first page isn't being rendered as a php)
Templarian
September 10th, 2008, 09:12 AM
You don't close with "php?>" you close php with "?>"
rororo
September 10th, 2008, 09:30 AM
yeah, my mistake.... BUT still no go...
i just see that entire script in the source.... doesn't matter where in the page i place it either..
rororo
September 10th, 2008, 09:36 AM
actually, i was just looking at the encoding of the page when saving... and it wasn't utf-8.... and now it seems to work....
:beam:
although i get some funny characters in the beginning of the page.... do you know what this is?
ן»¿
Templarian
September 10th, 2008, 10:01 AM
Its because your converted a page to UTF-8... Delete the document and recreate it, also get a decent editor what ever you using sounds horrible.
Komodo or
Dreamweaver or
Eclipse or
... theres tons just seach php editor in google.
All you need is php highlighting (some are vastly better than others though).
rororo
September 10th, 2008, 10:03 AM
thanks... i actually have a good one, but it's a bit old - it's called scite|Flash
it's been discontinued but i haven't found something than works as nice as this one for actionscript at least!
Templarian
September 10th, 2008, 10:08 AM
FlashDevelop(.org) is the best editor for Actionscript (it uses Scintilla, the open source editor as you probably know this is what scite is based off of).
Scite should get the job done though, but there are "better" editors.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.