开发者

Pear: Includes are successful but cannot find functions

EDIT: Solution...email is a function within Validate which is a class so you need to access it using:

Validate::email("anemail@email.com");

or

$val = new Validate(); $val->email("anemail@email.com");

Thanks red eyes

====================== original qu开发者_如何学运维estion ==============================

Hi,

I'm using Pear and have installed the package Validate to try it out.

Using the code:

<?php
require_once 'Validate.php';
email("anemail@email.com");
?> 

I get the error.

PHP Fatal error:  Call to undefined function email() in /home/benb/temp/pear.php on line 4

If I alter the code to include a non existent extension like require_once 'Validate2.php'; it gives me the error to say it can't find it. Also, if I view Validate.php I can see the email function within it.

So it seems as though it can find the extension but not the functions within it. Can anyone help? Thanks


It's possible to post Validate.php ? I think Validate.php it's PHP5 ;)

So it's

$val = new validate();
$val->email();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜