我在文件夹中创建了一个控制器,但我收到了此错误
<?php
class Test extends CI_Controller {
public function index(){
echo 'hello';
}
function hello() {
echo 'world';
}
}
?>
控制器/管理 -Test.php
这是控制器
$route['admin'] = 'admin/test';
这里是路线
from pylab import arange, cm, draw, rand
from matplotlib import pylab as plt
from time import sleep
import time
start_time = time.time()
plt.ion()
a = arange(25)
a = a.reshape(5,5)
fig = plt.figure(figsize = (5, 5))
for i in range(100):
ax = fig.add_subplot(111)
b = 5*rand(5,5)
cax = ax.matshow(a-b, cmap=cm.jet, vmin = -10, vmax = 25)
if i == 0:
fig.colorbar(cax)
draw()
sleep(0.01)
plt.show()
print("--- %s seconds ---" %(time.time() - start_time))
答案 0 :(得分:0)
使用此代码:
<强>路线:强>
$route['admin'] = 'admin/test/index';
<强>控制器:强>
<?php
class Test extends CI_Controller {
public function index(){
echo 'hello';
}
function hello() {
echo 'world';
}
}
?>