phpcms后台栏目点击添加内容,报错500,解决方法。

在后台添加文章内容时报错500,在网上找的一个帖子说是/phpcms/modules/content/fields/video/form.inc.php在上传至服务器时出现错误,果然发现服务器下的form.inc.php文件仅有2KB,而本地文件有8KB,把本地的覆盖过去以后就可以添加内容了。form.inc.php正常代码如下:

	function video($field, $value, $fieldinfo) {
		$value_data = '';
		//获取flash上传属性
		pc_base::load_app_class('ku6api', 'video', 0);
		$setting = getcache('video', 'video');
		if(empty($setting)) return L('please_input_video_setting');
		$ku6api = new ku6api($setting['sn'], $setting['skey']);
		$flash_info = $ku6api->flashuploadparam();
		
		//获取上传的视频
		$key = 0;
		$list_str = "
    "; if($value) { $video_content_db = pc_base::load_model('video_content_model'); $video_store_db = pc_base::load_model('video_store_model'); $videos = $video_content_db->select(array('contentid'=>$this->id), 'videoid, listorder', '', '`listorder` ASC', '', 'videoid'); if (!empty($videos)) { $videoids = ''; foreach ($videos as $v) { $videoids .= $v['videoid'].','; } $videoids = substr($videoids, 0, -1); $result = $video_store_db->select("`videoid` IN($videoids)", '`videoid`, `title`, `picpath`', '', '', '', 'videoid'); if (is_array($result)) { //首先对$result按照$videos的videoid排序 foreach ($videos as $_vid => $v) { $new_result[] = $result[$_vid]; } unset($result, $_vid, $v); foreach ($new_result as $_k => $r) { $key = $_k+1; $picpath = $r['picpath'] ? $r['picpath'] : IMG_PATH.'nopic.gif'; $list_str .= "
  • ".L('delete')."
  • "; } } } } $list_str .= "
"; $data = ''; if (!defined('SWFOBJECT_INIT')) { $data .= ''; $data .= ''; define('SWFOBJECT_INIT', 1); $data .= ' '; } $authkey = upload_key("$upload_number,$upload_allowext,$isselectimage"); $video_store_sel = defined('IN_ADMIN') ? '' : ''; $vms_str = $flash_info['allow_upload_to_vms'] ? '' : ''; return $data.'
'.L('videoes_lists').'
'.L('videoes_num').'
'.$list_str.'
'.L('select_upload_channel', '', 'video').' '.$vms_str.'
'.$video_store_sel.'

'; }

你可能感兴趣的:(phpcms)