Jump to content

fopen problem


Ziddia

Recommended Posts

Hi,

 

I am modding phpBB3 and I want to make the contents of a text documents appear in a border. This is what I have in my portal_style.html:

 

<!-- INCLUDE overall_header.html -->

<?php
$a1=fopen("/port/announce/announce1.txt", "r");
$a2=fopen("/port/announce/announce2.txt", "r");
$a3=fopen("/port/announce/announce3.txt", "r");
$a4=fopen("/port/announce/announce4.txt", "r");
$a5=fopen("/port/announce/announce5.txt", "r");
?>

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<div class="content">
    <?php
       echo $a1;
    ?>
   </div>

<span class="corners-bottom"><span></span></span></div></div>
  

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      <?php
      echo $a2;
      ?>
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

 

Anyone mind showing me how to make it work?

 

Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/237154-fopen-problem/
Share on other sites

Thanks- I have another problem. And I don't know what's causing it. Even though I have updated my document, the webpage stays exactly the same. Is this just a slow connection or what?

 

Here's the updated code:

<!-- INCLUDE overall_header.html -->

<?php
$a1=file_get_contents("/port/announce/announce1.txt", "r");
$a2=file_get_contents("/port/announce/announce2.txt", "r");
$a3=file_get_contents("/port/announce/announce3.txt", "r");
$a4=file_get_contents("/port/announce/announce4.txt", "r");
$a5=file_get_contents("/port/announce/announce5.txt", "r");
?>

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<div class="content">
    <?php
       echo $a1;
    ?>
   </div>

<span class="corners-bottom"><span></span></span></div></div>
  

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

   <div class="content">
      <?php
      echo $a2;
      ?>
   </div>

   <span class="corners-bottom"><span></span></span></div>
</div>

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<div class="content">
    <?php
       echo $a2;
    ?>
   </div>

<span class="corners-bottom"><span></span></span></div></div>

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<div class="content">
    <?php
       echo $a3;
    ?>
   </div>

<span class="corners-bottom"><span></span></span></div></div>

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<div class="content">
    <?php
       echo $a4;
    ?>
   </div>

<span class="corners-bottom"><span></span></span></div></div>

<h2>Announcement!</h2>

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>

<div class="content">
    <?php
       echo $a5;
    ?>
   </div>

<span class="corners-bottom"><span></span></span></div></div>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->

 

And here's the webpage: http://newportal.zidmc.x10.bz/nportal.php

 

Mind looking and telling me why this would happen?

Link to comment
https://forums.phpfreaks.com/topic/237154-fopen-problem/#findComment-1218846
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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