php tags are not working
Posted by: imran haider (---.nexlinx.net.pk)
Date: February 21, 2006 03:57PM

i have to be installed wampserver, and i received very different problems


1. tags <? ?> and <?= ?> are not working

2. i change the php.ini file short_open_tag=on, but it is not affecting what i do?

3. i check the phpinfo.php there is still showing short_open_tag=off


plz tell me in a good and exact solution


thanks


imran haider


Options: ReplyQuote
Re: php tags are not working
Posted by: Geoff (---.vs.vs.bostream.se)
Date: February 21, 2006 09:03PM

Maybe you need to change your DOCTYPE

if you have something like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
try removing it or add:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[www.w3.org];
<html xmlns="[www.w3.org];

Options: ReplyQuote
Re: php tags are not working
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 21, 2006 09:10PM

Doctype has absolutely NOTHING to do with your problem. Your problem is because you are using short ASP style tags.

change the first line your php script from:

<?

to this:

<?php

Also, you said you changed this setting in your php.ini file but the changes never too effect. After you change something in your php.ini file, you need to restart apache so the new settings take effect.

Options: ReplyQuote
Re: php tags are not working
Posted by: Geoff (---.vs.vs.bostream.se)
Date: February 21, 2006 09:19PM

Quote

Doctype has absolutely NOTHING to do with your problem. Your problem is because you are using short ASP style tags.

I had problems with doctype showing the php tags in "view source"

/G

Options: ReplyQuote
Re: php tags are not working
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 21, 2006 09:51PM

doctypes did not have anything to do with his particular problem. I was just explaining what the real problem was.

Options: ReplyQuote


Sorry, only registered users may post in this forum.