Page 1 of 1

Making PHP work

Posted: 2011-08-09 15:50
by FileZilla9
I want to create my own website. I have a page loaded by <some hoster>. They say php is running on their server.
When I download my program the php doesn't work. What can that be? The php in my script looks like this:

Code: Select all

<?php
	  if (1) 
	{ 
	  echo ”true”;
	} 
	  else 
	{	 
	  echo “false”; 
	}
php?>
What can be the problem?

Re: Making PHP work

Posted: 2011-08-10 00:21
by boco
I took the genuine code you posted and put it on my local test server. It works and displays "true". So either the server expects UNIX line endings and you didn't satisfy that requirement, or there are issues with the server's PHP implementation.
testphpgencode.PNG
testphpgencode.PNG (70.86 KiB) Viewed 4157 times

Re: Making PHP work

Posted: 2011-11-27 01:20
by Meagan
Thank you very much for this advice. I am creating a human resource management website, and ran into the very same issue. I really need to get this project off of the ground, so I hope that this advice helps me to solve this problem. The deadline is coming very quickly, and I still have to work all of the bugs out and make sure everything is operating properly.