Jump to content

*SOLVED* ini_set?


Recommended Posts

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

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

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/
Link to comment
https://forums.phpfreaks.com/topic/8683-solved-ini_set/
Share on other sites

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]
Link to comment
https://forums.phpfreaks.com/topic/8683-solved-ini_set/#findComment-31884
Share on other sites

Guest askjames01
ok, thanks for the manual URLs [b]TOPLAY[/b]

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?


Link to comment
https://forums.phpfreaks.com/topic/8683-solved-ini_set/#findComment-31894
Share on other sites

ini_set allows you to temporarly change PHPs setting. Some developers do the following:
[code]ini_set('arg_separator.output','&');[/code] 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.
Link to comment
https://forums.phpfreaks.com/topic/8683-solved-ini_set/#findComment-31955
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.