I'm not quite sure what's going on here. I'm trying to include a header, navigation menu and legal text on each of my pages, so I thought i'd try my hand at php. Here's what i have set up:
index is in the root (obviously)
header.php and legal.php are in /php
I want to make a template page that i can use everywhere, from the index.php in the root to contact.php in /contact so i'm using <?php include("/php/header.php"); ?>
this should mean that it is looking for header.php in root/php/ correct?
Yet I'm getting an error:
Warning: main(/php/header.php): failed to open stream: No such file or directory in /home/content/a/l/u/alubkin/html/index.php on line 53
Warning: main(/php/header.php): failed to open stream: No such file or directory in /home/content/a/l/u/alubkin/html/index.php on line 53
Warning: main(): Failed opening '/php/header.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/a/l/u/alubkin/html/index.php on line 53
i'm presuming that /home/content/a/l/u/alubkin/html/ is godaddy's server's directory for me, and that /php would look for /home/content/a/l/u/alubkin/html/php/. Is that correct? It's not trying to look for something in the root of godaddy's server is it?
what am i doing wrong?
index is in the root (obviously)
header.php and legal.php are in /php
I want to make a template page that i can use everywhere, from the index.php in the root to contact.php in /contact so i'm using <?php include("/php/header.php"); ?>
this should mean that it is looking for header.php in root/php/ correct?
Yet I'm getting an error:
Warning: main(/php/header.php): failed to open stream: No such file or directory in /home/content/a/l/u/alubkin/html/index.php on line 53
Warning: main(/php/header.php): failed to open stream: No such file or directory in /home/content/a/l/u/alubkin/html/index.php on line 53
Warning: main(): Failed opening '/php/header.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/a/l/u/alubkin/html/index.php on line 53
i'm presuming that /home/content/a/l/u/alubkin/html/ is godaddy's server's directory for me, and that /php would look for /home/content/a/l/u/alubkin/html/php/. Is that correct? It's not trying to look for something in the root of godaddy's server is it?
what am i doing wrong?