|
Image.php
[php]
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Image {
function Image($url)
{
echo "<hr/>";
echo "<font color = 'red'>The url isurl"."</font>";
echo "<hr/>";
}
function Rimage($url)
{
echo "Remove image to $url";
}
}
[/php]
在library目录下写了这样一个示例。
然后这样用:
$this->load->library('Image');
$this->Image->Rimage('../../');
搞不明白这错。。
报错:
A PHP Error was encounteredSeverity: Warning
Message: Missing argument 1 for Image::Image(), called in D:\webroot\x.cn\CodeIgniter_1.6.3\system\libraries\Loader.php on line 873 and defined
Filename: libraries/Image.php
Line Number: 7
A PHP Error was encounteredSeverity: Notice
Message: Undefined variable: url
Filename: libraries/Image.php
Line Number: 10
The url is:
A PHP Error was encounteredSeverity: Notice
Message: Undefined property: Welcome:Image
Filename: controllers/welcome.php
Line Number: 577
[ 本帖最后由 lxylxy888666 于 2008-8-14 16:03 编辑 ] |
|