Adding php to html -


i added php of pages, not coming on of pages.

<body class="menu">     <!-- slide bar starts here -->    <?php require ('/php/slider.php');?>     <!--slide bar ends here-->     <div class="body">         store comming     </div>     <script src="store.js"></script> </body> 

in php file had this.

<header>         <a href="#" class="menu-toggle">             <div class="bar"></div>             <div class="bar"></div>             <div class="bar"></div>         </a>         <nav class="menu-side">             <div class="listing">                 <div class="box"><a class="list" href="/"><h1>home</h1></a></div>                 <div class="box"><a class="list" href="/dayz_home/"><h1>dayz</h1></a></div>                 <div class="box"><a class="list" href="/photos/"><h1>photos</h1></a></div>                 <div class="box"><a class="list" href="/store/"><h1>store</h1></a></div>             </div>         </nav> </header> 

this exact same pages, , nothing coming up.

this error get:

[02-oct-2015 22:44:59 america/denver] php warning: include(): failed opening '/php/slider.php' inclusion (include_path='.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear') in /home2/itskeega/public_html/index.php on line 14

any idea wrong?

simply try first : remove slash in front of php in path , run again. if don't work continue reading.

let me as can.

first thing first, this

[02-oct-2015 22:44:59 america/denver] php warning: include(): failed opening'/php/slider.php' inclusion (include_path='.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear') in /home2/itskeega/public_html/index.php on line 14 

(just stating obvious me) means,

  1. there file called 'index.php' in public_html directory
  2. it has function "include()" on line 14 in code.
  3. the include function have path in parenthesis following it.
  4. there error in path.
  5. either file "slider.php" not there or script can't read it.

how know sure ?

failed opening'/php/slider.php' inclusion

why did tell ?

it understand errors next time.

now let's try solve error, first confirm file permissions , every other thing

  1. move file "public_html" folder itself.
  2. new path slider.php (take note of case).
  3. run script , errors now.

that simplest way it.

be very precise in "case" becuase see not using php conventions of naming everything.

report directory structure can further.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -