Jump to content


*SOLVED* ini_set?


  • Please log in to reply
4 replies to this topic

#1 Guest_askjames01_*

Guest_askjames01_*
  • Guests

Posted 29 April 2006 - 01:33 AM

ok, i was reading and trying to decode and understand a photogallery php script.
and suddenly i was stumbled with this code...

//PHPSESSION &AMP FIX
ini_set('arg_separator.output','&');

can you guys please explain this code to me further?
what this code do and mean?

and may be this --> &amp code is familiar to me and may be i also forgot the meaning? so what that code do too?

thanks n advance.

-/james/

#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 29 April 2006 - 04:33 AM

Let the manual be your friend:

[a href=\"http://us2.php.net/manual/en/function.ini-set.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.ini-set.php[/a]

[a href=\"http://us2.php.net/manual/en/ini.core.php#ini.arg-separator.output\" target=\"_blank\"]http://us2.php.net/manual/en/ini.core.php#...eparator.output[/a]

[a href=\"http://www.w3schools.com/tags/ref_entities.asp\" target=\"_blank\"]http://www.w3schools.com/tags/ref_entities.asp[/a]

#3 Guest_askjames01_*

Guest_askjames01_*
  • Guests

Posted 29 April 2006 - 05:58 AM

ok, thanks for the manual URLs TOPLAY

I now recall the meaning of this --> & it is just an ampersand.
and i review the manual with ini_set and still don't get it...

because when you look at this -->
[a href=\"http://www.artscraftworks.com/phpinfo.php\" target=\"_blank\"]phpinfo[/a]
the "arg_separator.output" is already set i think?

and why they still declare this? if the php.ini is already set to the right configuration i think?

//PHPSESSION &AMP FIX
ini_set('arg_separator.output','&');

any bright answer PHP GURUS?
I hope you get what i mean brothers?




#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 April 2006 - 02:26 PM

ini_set allows you to temporarly change PHPs setting. Some developers do the following:
ini_set('arg_separator.output','&');
so that when they validate their code with the W3C's HTML Validator it doesn't break their xHTML validation. As the validator will won't class your HTML as valid xHTML if your links has an & in them. Instead developers use the HTML entities version (&) of the ampersand.

#5 Guest_askjames01_*

Guest_askjames01_*
  • Guests

Posted 29 April 2006 - 06:00 PM

so it's all about validation huh.
that really make sense now.
thanks. wildteen




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users