简体   繁体   中英

php configuration error

My php files were working fine but today when i check them i get following errors.

Warning: require_once(Connections/deal.php) [function.require-once]: failed to open stream: No such file or directory in C:\complete project\ordering system\orderingcart.php on line 1

Fatal error: require_once() [function.require]: Failed opening required 'Connections/orders.php' (include_path='.;C:\php\pear') in C:\complete project\orderingcart.php on line 1

I don't know how to resolve these errors, where do I start?

This sounds like the file has either moved OR the file permission have been altered as to prevent the server account (usually www-data) from having access to it.

You might also have better luck by trying to access the file by suppling an absolute path, rather than a relative path, eg:

<?php

      $lines = file("C:\\Documents and Settings\\myfile.txt");

      foreach($lines as $line){
         echo($line);
       }

 ?> 

It means, the path you gave in require_once() is invalid. You have two options,

1.Checkout whether the path Connections/deal.php is correct or not. Do you have a folder Connections in the folder where this running file is placed? Is there a deal.php inside that folder Connections ?

I think your running file path is C:\\complete project\\ordering system\\orderingcart.php . It does not have such a folder and file. So place your Connections folder in C:\\complete project\\ordering system\\ and checkout .

2.Else, You can run the page without fatal error if you change the line to include_once(Connections/deal.php) . Functions assosciated with deal.php will be inactivated.

This file path issue give full file location like

if it is windows

require_once('C:/complete project/Connections/deal.php');

For reference

http://php.net/manual/en/function.realpath.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM