Jump to content

Recommended Posts

At work I mainly deal with Coldfusion, and just recently I started to work with PHP at home for my own projects.  When using the include() function is there a way to call in certain things (CSS) on those included pages just for layout viewing in Dreamweaver, but then when it gets uploaded, the server ignores it.

 

In coldfusion we have a <cfsilent>Link to CSS</cfsilent> tag so that we can see what we're doing exactly but then the server ignores it when it gets uploaded.

Link to comment
https://forums.phpfreaks.com/topic/47118-php-include-help/
Share on other sites

// For example
// config.php
$aConfig['app_debug'] = true;

// index.php
include 'config.php';

// When not using any template engine (i.e.: Smarty)
// inside the <head> tags
if ($aConfig['app_debug']) {
   echo "<link href='devOnly.css' rel='stylesheet' type='text/css'>";
}

 

assigning default values is the same as assigning values ($var = value;), you just put it in a file and change it value or use its value at runtime.

Link to comment
https://forums.phpfreaks.com/topic/47118-php-include-help/#findComment-229772
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.