Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey I'm editing a site with php and I'm having some troulble including a different php file, it's probably a silly mistake but is there any way I could fix it

include'header.php';?>


<img src="logos.png" height="100" width="100" />





<img src="tribe.png" height="200" width="700" align="middle" />


Sign Up Below


<form action="#" method="POST">
<input type="text" name="fname" size="25" placeholder="Your First Name" />


<input type="text" name="lname" size="25" placeholder="Your Last Name" />


<input type="text" name="username" size="25" placeholder="Your UserName" />


<input type="text" name="email" size="25" placeholder="Your Email" />


<input type="text" name="email2" size="25" placeholder="Re Enter Email" />


<input type="text" name="password" size="25" placeholder="Your Password" />


<input type="text" name="password2" size="25" placeholder="Re enter Password" />


<input type="submit" name="submit" value="Sign Up!" />
</form>



Welcome


<img src="class.jpg" width="750" height="600" align="center" />

Tribe is a website for students starting first year to get to know their classmates before they start school.


<img src="concert.jpg" width="450" height="300" />
<img src="hurl.jpg" width="450" height="300" />
<img src="disco.jpg" width="450" height="300" />
<img src="hang.jpg" width="450" height="300" />

What I have tried:

I've tried require and different formats of including it but none of them work.
Posted
Updated 17-Apr-16 8:52am
Comments
Mohibur Rashid 17-Apr-16 22:01pm    
do some testing. Try to check if the file exists or not first.

bool file_exists ( string $filename )

also include path follows file directory unless you specified absolute path
i.e
if your php file is in
/var/www/html/phpsrc.php
your include file is "some_include_file.php"
then
include "some_include_file.php"
would be
/var/www/html/some_include_file.php

1 solution

Did you really write include without '<?php...'>?

This is right syntax: PHP: include[^].

See also:
PHP: require[^],
PHP: require_once[^].

Note that the file could be not found, missing, its name misspelled, etc. Anyway, there is nothing difficult here.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900