Solving fatal error:failed opening required anomalies

Source: Internet
Author: User
Solve fatal error:failed opening required error!
Error message:
Warning:require_once (Abc.class.php) [Function.require-once]: failed to open stream:no such file or directory in D:\myphp Www\print.php on line 3

Fatal error:require_once () [function.require]: Failed opening required ' Abc.class.php ' (include_path= '); C:\php6\pear ') in D:\myphpwww\Print.php on line 3

print.php file: Introducing Abc.class.php Files
Require_once ' Abc.class.php ';

Abc.class.php file:
Class abc{
Receive a number and print the pyramid
Public Function Printstar ($n) {

for ($i =1; $i <= $n; $i + +) {
Print Space first
for ($k =1; $k <= $n-$i; $k + +) {
echo "";
Print the number of asterisks
}
for ($j =1; $j <= ($i-1) *2+1; $j + +) {
echo "*";
}
Echo
";
}
}
}

?>



Online said (1) cannot find the file, is the path error, but the reference path is not wrong Ah,
(2) said to be a folder permissions problem, but the D disk folder all gave, modified.
Hope that the great God is not generous to enlighten you.
------Solution--------------------
But I don't see the print.php file in the map.
------Solution--------------------
Print.php and Abc.class.php to put the same record.
------Solution--------------------
Your name is wrong.
The Intercept is Abc.calss.php
And your include is the
Abc.class.php
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.