LoginSignup
0
0

More than 1 year has passed since last update.

クラスを扱うときに気をつけること

Posted at

スクレイピングとは「データの整形や抽出を行うデータスクレイピング」


php
クラスの継承はひとつしかできない


クラスをインスタンス化する時、変数名とクラス名は一緒にしないほうがいい。
(例)$display5 = new display5;

require_onceは絶対パスでの指定が望ましいかも

-todoapp_list.php
-class
-DB
-dbc.php
-listpage
-display5.php

上記のフォルダ構成の時、dbc.phpを読み込んでいるdisplay5.phpをtodoapp_list.phpに読み込みたい時、display5.phpのrequire_onceでは__DIR__. '/../DB/dbc.php'のようにパス指定する

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0