전체 글
-
[객체지향PHP]6.include서버/PHP 2020. 11. 5. 07:59
출처:youtu.be/z3pZdmJ64jo 다른 php 파일의 객체를 불러오려면 include 함수를 이용해야 한다. 하지만 php를 작성 할 때 마다 또는 수 많은 객체를 불러오기 위해 include 로 일일이 다 불러오는 것은 번거롭기 때문에 spl_autoload_register(); 을 사용한다 _autoload 라는 것이 과거에 있었다는데 문제가 있어 현재는 사용하지 않는다고 한다. 위 내용을 따로 php 로 만들고 index.php 에서 include 하면 클래스 폴더에 형식에 맞는 내용들은 자동으로 불러온다. if(!file_exists()){ //찾을 수 없을 때 return false; } 위 내용을 include_once 전에 추가하면 복잡하게 나타나는 에러내용들을 줄 일 수 있다.
-
[객체지향PHP]5.Static ::(Scope Resolution Operator)서버/PHP 2020. 11. 5. 04:52
출처:youtu.be/L9jLxuLAAIY Class Person{ private $name public staitc $drinking Age=21; } 불러올 때는 ::(Scope Resolution Operator) 클래스 내에서 메서드로 불러 올 때는 public static function setDrinkingAge($newDA) { self ::$drinkingAge; } self :: 부모 클래스에서 불러 올 때는 parent:: ::(Scope Resolution Operator) 는 const 변수에도 똑같이 사용된다.
-
-
-
유니티 UI Fade In, Fade Out 클래스개발/UNITY 2020. 11. 4. 21:11
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class FIO_UI { private Graphic UI; private MonoBehaviour mono; private float time; public FIO_UI(Graphic UI, MonoBehaviour mono, float time) { this.UI = UI; this.mono = mono; this.time = time; } public void FIO(string command) { switch (command) { case "FI":..
-