You are here: crazy script prints variable value from other scripts? « PHP Programming Language « IT news, forums, messages
crazy script prints variable value from other scripts?

Posted by squash on 10/03/06 02:09

I have spent two hours trying to make sense of this script, called
crazy.php. The output should be nothing because $cookie_password is
nowhere defined in this script, correct? But it actually outputs the
value that other scripts i have running set it to. Why should crazy.php
care what other scripts are running that use that variable name??


<?php

crazy();

////////////////////////////

function crazy() {

global $cookie_password;

echo $cookie_password;

} // end function

?>

 

Navigation:

[Reply to this 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

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