[SOLVED]ASP-style tags <% %>

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

[SOLVED]ASP-style tags <% %>

Post 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.
Last edited by pleigh on Tue Feb 14, 2006 1:16 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

did you remember to restart your web server? did you edit the wrong php.ini file?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post 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
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post by pleigh »

oops...never thought of that.. :oops:

i'll give it a try...thanks guys..
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post 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)
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

The next step would be to post the output of phpinfo()
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post 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.. :(
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post 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. :)
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post 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.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Whilst you are still able to make the choice, using ASP tags for PHP is discouraged :)
Post Reply