名前空間とuseステートメントに少し問題があります。
3つのファイルShapeInterface.phpがShape.phpありCircle.phpます。
私は相対パスを使用してこれをやろうとしているので、これをすべてのクラスに入れました:
namespace Shape;
私のサークルクラスには、次のものがあります。
namespace Shape;
//use Shape;
//use ShapeInterface;
include 'Shape.php';
include 'ShapeInterface.php';
class Circle extends Shape implements ShapeInterface{ ....
includeステートメントを使用しても、エラーは発生しません。use私が得るステートメントを試してみると:
致命的なエラー:クラス 'Shape \ Shape'が/Users/shawn/Documents/work/sites/workspace/shape/Circle.phpの8行目に見つかりません
誰かがこの問題について少しアドバイスをくれませんか?