bigbstanley Posted April 15, 2007 Share Posted April 15, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/47118-php-include-help/ Share on other sites More sharing options...
ignace Posted April 15, 2007 Share Posted April 15, 2007 nope, just add a variable in your config which you set to true for development but set to false for live Quote Link to comment https://forums.phpfreaks.com/topic/47118-php-include-help/#findComment-229751 Share on other sites More sharing options...
bigbstanley Posted April 15, 2007 Author Share Posted April 15, 2007 haha - I'm a total noob to php. Can you expand on that a bit more or point me to some tutorial? - sorry. Also, a bit unrelated, but how to I assign a default value to a variable? Quote Link to comment https://forums.phpfreaks.com/topic/47118-php-include-help/#findComment-229758 Share on other sites More sharing options...
ignace Posted April 15, 2007 Share Posted April 15, 2007 // 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. Quote Link to comment https://forums.phpfreaks.com/topic/47118-php-include-help/#findComment-229772 Share on other sites More sharing options...
bigbstanley Posted April 15, 2007 Author Share Posted April 15, 2007 perfect! - thanx Quote Link to comment https://forums.phpfreaks.com/topic/47118-php-include-help/#findComment-229787 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.