Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member John Mc Grath's Avatar
    Join Date
    Sep 2011
    Location
    Ireland
    Posts
    80
    Member #
    29172
    Liked
    3 times
    Just wondering about this, which I reckon is probably a simple question, can you use php code to retrieve more php code from a database? I am trying to call an <?php include("");?> operation which I have stored in a database but when I load the site the include code line appears instead of the code contained in the include. I could easily fix this problem by placing the code within the include straight into the database but I would rather have it close by in my editer as the code is quite large. It would also be good to know this for future refference. Thanks for your help.
    Im pretty new to web design but I am learning fast. I will help if I can.
    Check out my sites http://www.mediareviewzone.com http://www.iamrobsmith.com

  2.  

  3. #2
    Senior Member Kayo's Avatar
    Join Date
    Dec 2006
    Location
    Brampton Ontario
    Posts
    416
    Member #
    14523
    Liked
    39 times
    Whether or not if it's possible, it doesn't look like good practice to me. It creates a massive security loophole.
    John Mc Grath likes this.

  4. #3
    Member John Mc Grath's Avatar
    Join Date
    Sep 2011
    Location
    Ireland
    Posts
    80
    Member #
    29172
    Liked
    3 times
    I thought there could be issues like that but it would make it so much easier to modify the code in an editer rather than in a database. Thanks for you input
    Im pretty new to web design but I am learning fast. I will help if I can.
    Check out my sites http://www.mediareviewzone.com http://www.iamrobsmith.com

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    Database is for data, not for PHP scripts.
    Kayo is correct ... a bad practice to let anything edit PHP, or a database to store PHP scripting.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:22 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com