埋め込みコードをアップロードするためのテキスト領域があります。埋め込みコードを投稿すると、完全なコードが投稿されません。これは私の埋め込みコードです
<iframe frameborder="0" width="480" height="308" src="http://www.dailymotion.com/embed/video/xt7dgo?autoplay=0&logo=0&hideInfos=1&start=0&syndication=108944&foreground=%23F7FFFD&highlight=%23FFC300&background=%23171D1B"></iframe>
これは、これを取得するための私のphpコードです。
public function embeded(){
$this->form_validation->set_rules('video_heading', 'Video heading', 'required|trim|xss_clean');
$this->form_validation->set_rules('embeded', 'Embeded code', 'required|trim|xss_clean');
$this->load->model('videos');
$error['error']="";
if ($this->form_validation->run() == FALSE)
{
$error['error']= validation_errors();
$this->load->view('sidebar');
$this->load->view('addvideo', $error);
$this->load->view('footer');
}else{
//<iframe width="420" height="315" src="http://www.youtube.com/embed/Niiyh3sxwYk" frameborder="0" allowfullscreen></iframe>
$plink=$this->videos->processlink($this->input->post('embeded'));
$info = array('heading'=>$this->input->post('video_heading'),
'status'=>$this->input->post('status'),'video'=>$plink,
'comment'=>$this->input->post('comment'),'category'=>$this->input->post('category'));
$this->load->model('videos');
$obj= (object)$info;
echo "opsted_link".str_replace("syndication","syndicate", $_POST['embeded']);
if(isset($_POST['embeded']))
{
echo $_POST['embeded'];exit;
}
//$this->videos->addembededvideo($obj);
}
}
私がそれを使用すると、このようにiフレームコードが部分的に取得されます。
<iframe frameborder="0" width="480" height="308" src="http://www.dailymotion.com/embed/video/xt7dgo?autoplay=0&logo=0&hideInfos=1&start=0&syndicati></iframe>
src のパラメーター syndication=108944 を syndicator=108944 に変更しました。
今、私は完全なURLを取得します!
「シンジケーション」は予約語ですか? なぜこれが起こるのですか?