Jump to content

Search the Community

Showing results for tags 'include()'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. I am trying to identify the style.css through the config file then bring into the project using the include command. I can get the project to tell me which css style is listed but it is not actually linking the css. Is this possible or am i wasting my time. I want to do it this way so that I can change the style.css if required and it pick up the new details without the need to clear cache to implement changes. ####### CONFIG.PHP <?php //EXTRA PARAMETERS $sitename = "DEMO SITE"; $timezone = "Australia/Brisbane"; //Set for head office location $stylecss = "../include/style.css"; $loginurl = ""; // default landing page for login $logoimg = ""; $logoimg_params = "height='50px', width='100px'"; ?> ####### INDEX.PHP <?php session_start(); include('include/config.php'); include('include/edb.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo $sitename?></title> <link href="<?php echo $stylecss?>" rel="stylesheet" type="text/css" /> </head>
  2. I have a very simple page, where I use the include statement that includes my connection string. The connection string and a variables are not being passed to my test server - (WAMP). My include file is below $server = "servername"; $username = "username"; $password = ""; $database = "dbname"; $portNumber = 3308; $link = mysqli_connect($server,$username,$password,$database,$portNumber); if(!$link) { echo "cannot connet to the server"; } else { echo "This works"; } echo "Hi"; I am including this file with the following code: include ("includes/connect.inc"); My site is not connecting to the database, and is not displaying "This works", or "Hi". Do you have any pointers on how to get this connect?
  3. I have a file outside of the site root folder containing the password to connect to mysql that is being saved in a function, which is being included in my custom cms_class.php. Now my cms_class.php file is going to be included into a few other files including the main index.php file. Now we know when using relatives path is a big no no when including a file that has already included a file. So whats the successful way to do this. my directory looks something like this: /x/server/www <--- siteroot /x/server/www/cms/cms_class.php /x/server/www/index.php <-- main index a.k.a Home file /x/server/pass.php pass.php ---->includes into -->cms_class.php---->includes into --->index.php ---->includes into ---> (random files in different folders) im also including the pass.php file into phpmyadmin and other config files so i can change passwords from one file that is secured. (at least i think it is since its outsite of the siteroot folder) /x/server/apps/phpmyadmin/config.inc the reason for me doing this is just to protect the password to connect to my databases. If someone knows another way, better or not please let me know since im always interested in different methods when it comes to passwords protections, but i still want to know what will be the right way to include these files since i'm going to be doing something similar later with different files. Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.