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
Re: self-modifying program [message #174358 is a reply to message #174352] Wed, 08 June 2011 07:17 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 08/06/2011 6:44, Jivanmukta escribió/wrote:
> 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.

Why do you need that the file is reachable through the web browser? Are
you by chance doing stuff like this?

require_once('https://example.com/secure/constants.php');

If you do so, that would explain why it isn't working.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[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: Thu Nov 28 07:19:28 GMT 2024

Total time taken to generate the page: 0.04057 seconds