Reply to Re: $_SERVER['PHP_SELF']-question

Your name:

Reply:


Posted by Hilarion on 10/26/05 18:22

>>> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>>> <?-tags) in the action parameter of a form does not show up in the
>>> resent html-page?
>>
>>
>>
>> Are you sure it is:
>>
>> <?php echo $_SERVER[ 'PHP_SELF' ]; ?>
>>
>> You may try this somewhere on the page:
>>
>> <pre>
>> <?php
>> print_r( $_SERVER );
>> ?>
>> </pre>
>>
>> and check what is there and what is not.
>> If you do not want to show it to users, then change "<pre>" to "<!--"
>> and "</pre>" to "-->".
>
> Forgot to look under the hood.
>
> [REQUEST_URI] => /apache2-default/info4u/bewerkNrJrg.php
> [SCRIPT_NAME] => /apache2-default/info4u/bewerkNrJrg.php
> [PHP_SELF] => /apache2-default/info4u/bewerkNrJrg.php
>
> Is this what you mean?


Yes. This means that $_SERVER['PHP_SELF'] is there but you
are accessing it in a wrong way. Look for typo or something
like that (or maybe you forgot to "echo" it).

You may also want to change your level of error reporting by
placing "error_reporting( E_ALL );" in the first line of your
script (only for debug, in production this can be a bit dangerous
because info comming from error messages can be used by attackers).


Hilarion

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация