FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » self-modifying program
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
self-modifying program [message #174352] Wed, 08 June 2011 04:44 Go to previous message
Jivanmukta is currently offline  Jivanmukta
Messages: 20
Registered: January 2011
Karma:
Junior Member
Hello,
I need your opinions about my solution.
I have written a website containg twenty .php pages. I don't use any
framework, but I use my libraries of functions and classes.
These .php pages need a number of global constants, for example MySQL
user and password or path to log file. I have these constants in
secure/constants.php file, where "secure" is a folder available
through SSL protocol (I mean it contains .htaccess file). Here's part
of my secure/constants.php:

<?php
define('MYSQL_SERVER', 'localhost');
define('MYSQL_DATABASE', 'ogloszenia');
define('MYSQL_USER', 'root');
define('MYSQL_PASSWORD', 'mysql');
define('LOG_PATH', 'C:\Documents and Settings\Robert\Moje dokumenty
\Informatyka\ogloszenia-nieruchomosci\log\log.txt');
....

I also have a page secure/configure.php contaning a form to assign
values to these constants, and proper file_put_contents call (to write
"define" commands to secure/constants.php file). As I said before,
"secure" folder is available through SSL only.

Q: What do you think of my solution? Do you have any better idea?
Thanks in advance.

newbie
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: We wholesale Amazon Kindle/ Monster Beats / Ipods / Apple products of all types
Next Topic: [newbie] datetime issues
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 08:49:47 GMT 2024

Total time taken to generate the page: 0.04600 seconds