回答編集履歴
2
修正
test
CHANGED
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
> include_once(/var/www/example.jp/wp-content/themes/twentyseventeen-child/css/): failed to open stream: No such file or directory in /var/www/example.jp/wp-content/themes/twentyseventeen-child/page-xxx.php on line 29
|
78
78
|
|
79
|
-
> include_once(): Failed opening '/
|
79
|
+
> include_once(): Failed opening '/var/www/example.jp/wp-content/themes/twentyseventeen-child/css/' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/example.jp/wp-content/themes/twentyseventeen-child/page-xxx.php on line 29
|
80
80
|
|
81
81
|
|
82
82
|
|
1
追記
test
CHANGED
@@ -25,3 +25,59 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
[allow_url_include](http://php.net/manual/ja/filesystem.configuration.php#ini.allow-url-include) が、 0 (OFF) になっているというメッセージなので、php.ini 等で、 allow_url_include を有効に設定してください。
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
----
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
追記を受けて...
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
> 明記したコードは下記の通りになります。
|
40
|
+
|
41
|
+
> <?php
|
42
|
+
|
43
|
+
> include_once(TEMPLATEPATH.'/calendar2/');
|
44
|
+
|
45
|
+
> ?>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
まず、include_once は、`実在するファイル`しか読み込めません。
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
TEMPLATEPATH は、通常、テンプレートディレクトリのファイルパスが定義されているので、`/var/www/example.jp/wp-content/themes/twentyseventeen-child` のような感じになると思うのですが...
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
試しに、wordpress の twentyseventeen の子テーマで page-xxx.php を作成して、
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
<?php
|
64
|
+
|
65
|
+
echo "TEMPLATEPATH";
|
66
|
+
|
67
|
+
include_once(TEMPLATEPATH.'/css/');
|
68
|
+
|
69
|
+
?>
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
のように試しにディレクトリを include させてみたところ、
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
> include_once(/var/www/example.jp/wp-content/themes/twentyseventeen-child/css/): failed to open stream: No such file or directory in /var/www/example.jp/wp-content/themes/twentyseventeen-child/page-xxx.php on line 29
|
78
|
+
|
79
|
+
> include_once(): Failed opening '/home/studiocue/ExampleJP/www1.example.jp/wp-content/themes/twentyseventeen-child/css/' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/example.jp/wp-content/themes/twentyseventeen-child/page-xxx.php on line 29
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
というエラーになりました。
|