Page 1 of 1

[SOLVED]ASP-style tags <% %>

Posted: Tue Feb 14, 2006 12:25 am
by pleigh
can someone help me with this...i want to use the asp-style tag for php, i tried to run a simple code

Code: Select all

<% echo 'you may optionally use ASP-style tags' ; %>
i also turned "on" the asp_tags in my php.ini...when i tried to browse it, the same code appears and it does not execute..pls help. :)

many thanks.

Posted: Tue Feb 14, 2006 12:44 am
by feyd
did you remember to restart your web server? did you edit the wrong php.ini file?

Posted: Tue Feb 14, 2006 12:44 am
by josh
Did you restart apache after making those changes to your php.ini (if you use apahce...)


Can you post the relevant line out of your php.ini just so we can check your work?


~~~~
edit: feyd beat me

Posted: Tue Feb 14, 2006 12:50 am
by pleigh
oops...never thought of that.. :oops:

i'll give it a try...thanks guys..

Posted: Tue Feb 14, 2006 12:54 am
by pleigh
hi, never worked when i restarted apache...below are the lines i think relevant to this

; Allow ASP-style <% %> tags.
asp_tags = On
i turned it On already....oh, by the way, i am using xampp for this...so there are 2 .ini files, i turned them both On (the asp_tags)

Posted: Tue Feb 14, 2006 1:01 am
by josh
The next step would be to post the output of phpinfo()

Posted: Tue Feb 14, 2006 1:12 am
by pleigh
i'm confused now...i already turned enabled the asp_tags in my ini file, but why is it in my phpinfo(), it is not enabled...local and master values are set to Off...help pls.. :(

Posted: Tue Feb 14, 2006 1:16 am
by pleigh
its ok now, i edited the ini file located inside the apache folder...restarted the web server, and its good to go..thanks for the idea. :)

Posted: Tue Feb 14, 2006 3:09 am
by AKA Panama Jack
pleigh wrote:hi, never worked when i restarted apache...below are the lines i think relevant to this

; Allow ASP-style <% %> tags.
asp_tags = On
i turned it On already....oh, by the way, i am using xampp for this...so there are 2 .ini files, i turned them both On (the asp_tags)
If this is the windows version of XXAMP you need to edit the php.ini in the apache/bin directory. There are 4 different php ini files.

Posted: Tue Feb 14, 2006 5:14 am
by Jenk
Whilst you are still able to make the choice, using ASP tags for PHP is discouraged :)