Jump to content

Localhost is blind to php.


Yuval200
 Share

Recommended Posts

Well, after some ages, I finally installed php (if some one remmebers my last topic) via the EasyPHP program.all is fine, went to the "www" folder and made a directory called "Yuval", and created a page called "test.php" (the page adress was "http://localhost/Yuval/test.php").I opened the file's source and found the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=windows-1255"></HEAD><BODY></BODY></HTML>

I didn't changed the code itself, but just added the lines:

<p>This is going to be ignored.</p><?php echo 'While this is going to be parsed.'; ?><p>This will also be ignored.</p>

So the code was:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=windows-1255"></HEAD><BODY><p>This is going to be ignored.</p><?php echo 'While this is going to be parsed.'; ?><p>This will also be ignored.</p></BODY></HTML>

I saved the the notepad thingy with the code, quited the notepad and refreshed.Nothing, not only it didn't viewed anything I wrote, but when I checked the source to see if somthing was wrong, the code was all the same as it was when I found it.I really want to learn php, and I would be happy if you could help me.Yuval.PS: if it matters, my operating system is Windows 98 SE.

Link to comment
Share on other sites

Are you using IE to view the page?If you are it may be a simple cache problem.Goto Tools > Internet OptionsOn the General Tab click SettingsMake sure 'Every visit to the page' is selected and hit OK.That may help if not post here again.

Link to comment
Share on other sites

Are you using IE to view the page?If you are it may be a simple cache problem.Goto Tools > Internet OptionsOn the General Tab click SettingsMake sure 'Every visit to the page' is selected and hit OK.That may help if not post here again.

Thanks, but it didn't helped :[.Btw, if it matters, when I open the source is notepad, the title of the notepad is not like the page's name (witch is "test") but "test[1]".
Link to comment
Share on other sites

did you decline to overwrite the original file? Cause that might have named it something different. Not really sure, I'm not a windows guy so I couldn't tell you what notepad would do *shrugs*. But I've heard that cache related problems are usually solved by reloading the browser (which might reload your settings too).

Link to comment
Share on other sites

You are trying to use the browser to do View Source and then edit that, you can't do that, you are editing the local cache copy of the output, not the page itself. Use Windows Explorer (the shell, not the browser) to find your HTML file and open it directly in notepad (if you must..) to edit it, don't go through your browser. Browser is for viewing the output only, not for editing.

Link to comment
Share on other sites

You are trying to use the browser to do View Source and then edit that, you can't do that, you are editing the local cache copy of the output, not the page itself.  Use Windows Explorer (the shell, not the browser) to find your HTML file and open it directly in notepad (if you must..) to edit it, don't go through your browser.  Browser is for viewing the output only, not for editing.

Thanks ALOT!I converted the .php file to .txt, edited the file, then made it .php again, and it worked!The prosses is taking some time due the fact that the computer I am using now is slow, and the EasyPHP thing is running, but I can really start coding now! Thanks!Edit: And I would like to thank aspnetguy and asylum for the help too :)
Link to comment
Share on other sites

You don't have to convert the extension to .txt if you're about to edit ".php" files, they can be opened in notepad too :)In fact, everything that is not too big can be opened in notepad, yes even media files! :)Just so that you won't have to go over that process, you can just edit the .php file directly :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...