Blog Problem

when i copy the

public static function string2array($tags)

{


	return preg_split('/\s*,\s*/',trim($tags),-1,PREG_SPLIT_NO_EMPTY);


}





public static function array2string($tags)


{


	return implode(', ',$tags);


}

to the tag model i get the

PHP Error

Description

include(parend.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

Source File

C:\xampp\htdocs\Yii\framework\YiiBase.php(338)

00326: * @param string class name

00327: * @return boolean whether the class has been loaded successfully

00328: */

00329: public static function autoload($className)

00330: {

00331: // use include so that the error PHP file may appear

00332: if(isset(self::$_coreClasses[$className]))

00333: include(YII_PATH.self::$_coreClasses[$className]);

00334: else if(isset(self::$_classes[$className]))

00335: include(self::$_classes[$className]);

00336: else

00337: {

00338: include($className.’.php’);

00339: return class_exists($className,false) || interface_exists($className,false);

00340: }

00341: return true;

00342: }

00343:

00344: /**

00345: * Writes a trace message.

00346: * This method will only log a message when the application is in debug mode.

00347: * @param string message to be logged

00348: * @param string category of the message

00349: * @see log

00350: */

Stack Trace

#0 C:\xampp\htdocs\Yii\framework\YiiBase.php(338): autoload()

#1 unknown(0): autoload()

#2 C:\xampp\htdocs\blog\protected\models\Post.php(37): spl_autoload_call()

#3 C:\xampp\htdocs\Yii\framework\db\ar\CActiveRecord.php(985): Post->afterSave()

#4 C:\xampp\htdocs\Yii\framework\db\ar\CActiveRecord.php(724): Post->insert()

#5 C:\xampp\htdocs\blog\protected\controllers\PostController.php(71): Post->save()

#6 C:\xampp\htdocs\Yii\framework\web\actions\CInlineAction.php(32): PostController->actionCreate()

#7 C:\xampp\htdocs\Yii\framework\web\CController.php(300): CInlineAction->run()

#8 C:\xampp\htdocs\Yii\framework\web\filters\CFilterChain.php(129): PostController->runAction()

#9 C:\xampp\htdocs\Yii\framework\web\filters\CFilter.php(41): CFilterChain->run()

#10 C:\xampp\htdocs\Yii\framework\web\CController.php(1049): CAccessControlFilter->filter()

#11 C:\xampp\htdocs\Yii\framework\web\filters\CInlineFilter.php(59): PostController->filterAccessControl()

#12 C:\xampp\htdocs\Yii\framework\web\filters\CFilterChain.php(126): CInlineFilter->filter()

#13 C:\xampp\htdocs\Yii\framework\web\CController.php(283): CFilterChain->run()

#14 C:\xampp\htdocs\Yii\framework\web\CController.php(257): PostController->runActionWithFilters()

#15 C:\xampp\htdocs\Yii\framework\web\CWebApplication.php(324): PostController->run()

#16 C:\xampp\htdocs\Yii\framework\web\CWebApplication.php(121): CWebApplication->runController()

#17 C:\xampp\htdocs\Yii\framework\base\CApplication.php(135): CWebApplication->processRequest()

#18 C:\xampp\htdocs\blog\index.php(13): CWebApplication->run()

in the page http://localhost/blog/index.php?r=post/create

someone know how to solve this problem, thanks

Looking at your stack trace it looks like to come from your post model not tag model. Shouldnt "parend" be Parent.php ? as it tries to autoload you should have something like new parend();

But it just happens when i copy the array2string and string2array