Php – function.require-once is giving error in the wamp server

PHP

Im trying to run something like this:

<a href="login.php?logout=1" id="logout">logout</a>

<div id="main">

<?php require_once('getPhotos.php') ; ?>

<div id="response" class="hidden" />
</div><!-- end main-->

But Im getting this error.

Warning: require_once(1) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\myPhotosWebsite\index.php on line 17
Fatal error: require_once() [function.require]: Failed opening required '1' (include_path='.;C:\php5\pear') in C:\wamp\www\myPhotosWebsite\index.php on line 17

Any sugesstions…what iam doing wrong

Best Answer

  • does the getPhotos.php exist?
  • where is it?
  • is it written exactly like that?