Jump to content

guitarboy8d6

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

guitarboy8d6's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I copy and pasted dirertly to there and it still gives me the same error. Warning: file_get_contents©: failed to open stream: No such file or directory in /home/flairandheat.com/www/flairandheat.com/par.php on line 15
  2. ok I'm fairly new at php and have been trying to do a site for my mom that she can edit on her own. So I created a file par.php that holds several diffrent includes mainly for style stuff, and content. One of my thing in there is this <? $page[home]="index.php"; $page[services]="services.php"; $page[health]="health"; $page[eff]="effciency.php"; $page[about]="aboutus.php"; $page[contact]="contact.php"; $display=$_GET['page']; file_get_contents ($display); ?> I have the browser send a uri of [a href=\"http://www.flairandheat.com/par.php?page=contact\" target=\"_blank\"]http://www.flairandheat.com/par.php?page=contact[/a] to try and open the contents of the contact page. But I get the following Error. Warning: file_get_contents(contact): failed to open stream: No such file or directory in /home/flairandheat.com/www/flairandheat.com/phpsite/par.php on line 17 contact.php is in the directory and if you browse to it, you basicly see some text that I want to be displayed where I placed the script. I have a links file that is included on everypage that looks like this. <div class="nav"> <a href="index.php">home</a> | <a href="par.php?page=services">services</a> | <a href="health.php">health</a> | <a href="efficiency.php">efficiency</a> | <a href="aboutus.php">about us</a> | <a href="par.php?page=contact">contact us</a></div> The only file that exestist though is contact.php because I didn't want to go through the trouble of making all the pages if I couldn't get this to work. I am basicly looking for a way to get par.php to display the contents of the files set in the array. I'm not sure were to go to get it working right. I am open to any suggestions that people have and if you can kinda explain why it works that would be great too.
×
×
  • 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.