🔥 کمپین سال عزتتا پایان اردیبهشت ادامه دارد (در این روزهای سخت در کنار شما هستیم)
۰ ثانیه
۰ دقیقه
۰ ساعت
۰ نوید خزائی پور
مشکل از loader
جامعه پی اچ پی ایجاد شده در ۰۳ فروردین ۱۴۰۵

وقت بخیر

من هرچی use میکنم response رو میگه not found 

 

<?php
namespace App\Utilitis;
class Responce{
    public static function respond($data,$status_code){
    header('content-type: application/json');
    header("http 1/1 $status_code ok");
    return json_encode($data);
    }
}

 

<?php
include_once "App/iran.php";
spl_autoload_register(function($class){
    $class_file = __DIR__ . "/" . $class . ".php";
    if(!(file_exists($class_file) and is_readable($class_file)))
        die("$class not found");
    include_once $class_file;
});
use \App\Utilitis\Responce;
Responce::respond([5],200);