jamboemm Posted March 13, 2007 Share Posted March 13, 2007 Hi all, I am new to PHP and i am trying to include a top navigation to my page so i only need to change the link once for all my pages. But when i use the code <?php include('top.php'); ?> at the top of my page and i have content underneith it , all my content dissapears and it wont let me edit it unless i take the <?php include('top.php'); ?> out of the code. Any Help Would Be Appreciated Thank You! Jamie Quote Link to comment https://forums.phpfreaks.com/topic/42568-include-php-file-the-dissapears-please-help/ Share on other sites More sharing options...
aebstract Posted March 13, 2007 Share Posted March 13, 2007 Your content actually disappears off of the website once this file is uploaded? Also do you have your content in top.php layed out like: <?php echo "allalala"; ?> ? If not, it should be.. it needs to be in php and echoed as well. Quote Link to comment https://forums.phpfreaks.com/topic/42568-include-php-file-the-dissapears-please-help/#findComment-206561 Share on other sites More sharing options...
jamboemm Posted March 13, 2007 Author Share Posted March 13, 2007 Hi thanks for your response, My content is there when viewed online but i canot see it withing dreamweaver to edit it, I have my navigation content on the top.php and my main content on index.php and all i have done is added the include top.php code at the very top of my index.php page and underneith that i have my main content. What am i doing wrong? Thanks Again Jamie Quote Link to comment https://forums.phpfreaks.com/topic/42568-include-php-file-the-dissapears-please-help/#findComment-206565 Share on other sites More sharing options...
aebstract Posted March 13, 2007 Share Posted March 13, 2007 I don't think you can see it in dreamweaver, not when using php code. You'll have to edit your content without design mode. Quote Link to comment https://forums.phpfreaks.com/topic/42568-include-php-file-the-dissapears-please-help/#findComment-206568 Share on other sites More sharing options...
suzzane2020 Posted March 13, 2007 Share Posted March 13, 2007 hi, i guess wat u mean is that ur script codings are not visible once the include syntax is added? I had the same issue once and moved the include syntax into the body of the file, rather than placing it at the very beginning. Quote Link to comment https://forums.phpfreaks.com/topic/42568-include-php-file-the-dissapears-please-help/#findComment-206572 Share on other sites More sharing options...
jamboemm Posted March 13, 2007 Author Share Posted March 13, 2007 oh really :S Am not very good with code, there must be a way of being in design view when using php cause the option isint disabled its just for some reason my content dissapeard ehrn i put in the inclus top.php code, a thought a saw something about seperating the page so it knows where to start and stop. Can anyone help me? Jamie Quote Link to comment https://forums.phpfreaks.com/topic/42568-include-php-file-the-dissapears-please-help/#findComment-206574 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.