Jump to content
Larry Ullman's Book Forums

ronny

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by ronny

  1. Thanks...Antonio,,, fabulous thats exactly my question is.... thx a lot for explain .. l now have the idea of constant defining... Thanks.. HartleySan,, coz l had got confusion of using Constant for string and resource, thought string & resource are same type and usage.. l now got the idea of it, thx you guys are truly PHP Experts....
  2. Thanks a lot for your answer.. Maybe l am not fully understand the language, pls correct if l am wrong but my question come up is : <?php require('../inc.config.php') --> Constant 'MYSQL' defined in this file // e.g. define('MYSQL', 'connection string here'); // now can use MYSQL anywhere in script echo MYSQL; //output MYSQL connection string or use MYSQL for connection ?> my question is if l had already include '../inc.config.php', l already can use 'MYSQL' constant for my connection string anywhere in my script, why should l write require(MYSQL) again ? Thanks
  3. Hello, l have recently got Effortless E-Commerce this book, however, when l read 'Selling virtual products' chapter, l come up with a question: the code: <?php require('../inc.config.php') --> Constant 'MYSQL' defined in this file require(MYSQL); --> require constant ... ... ... ?> with this code, since the constant have been defined in inc.config.php, the MYSQL constant should have a global scope to be used and it could be access anywhere using 'MYSQL'. Why bother require(MYSQL) again in this script ? i am not quite understanding the usage of this == hope anyone could provide expert view. Thanks...
×
×
  • Create New...