davemcc Posted October 24, 2007 Share Posted October 24, 2007 Hi Can anyone help? I need to make a website easily updateable via .txt files. I want to be able to control where the text is diplayed on a webpage inside a div tag. I also need to be able to control the contents with CSS. This is what i have got so far: http://mickleovercommunitycentre.co.uk/Oakwood/nnn/ However i cannot get rid of the border! I basically want to display the text as if i had typed it directly into html. Please can someone with far better knowlage than me help?! I am doing this for a community centre so its all in a good cause! Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/74584-community-centre-website-needs-php-help/ Share on other sites More sharing options...
adam291086 Posted October 24, 2007 Share Posted October 24, 2007 display your code Quote Link to comment https://forums.phpfreaks.com/topic/74584-community-centre-website-needs-php-help/#findComment-376925 Share on other sites More sharing options...
davemcc Posted October 24, 2007 Author Share Posted October 24, 2007 File: index.php iframe src="news.php" width="250"; height="400"> File: news.php $lines = file("news.txt"); foreach($lines as $ln) { echo "$ln "; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74584-community-centre-website-needs-php-help/#findComment-376926 Share on other sites More sharing options...
adam291086 Posted October 24, 2007 Share Posted October 24, 2007 i am also a new guy to php. You cant remove the border as its a set function of the iframe. I have a simple page working, the code is below. All you need to do is add the php for opening up the file in the section where the div tag are. So edit the code below with your file info and insert it between the DIV tags [code} <html> <head> </head> <body> <?php // Get a file into an array. $lines = file_get_contents('adam.txt'); if ($lines { echo $lines; } else { echo "No File Found"; } ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/74584-community-centre-website-needs-php-help/#findComment-376932 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.