phpgettitle的简单介绍

本文目录一览:

php中的GET问题

POST GET ,是提交表单的两种方式,GET传值就用$_GET获取,POST提交表单就用$_POST

post与get的区别是一个在地址栏显示参数,另一个不显示

举个例子,如果你登录的时候用get方式,那么你的值就会在地址栏上显示,这样就无安全性可言

而你在搜索或者有页码的时候 用post把参数在地址栏上隐藏起来,这样就毫无意义

而用$_GET可以获得浏览器地址栏上的参数的值(?问号后面的一串字符),比如,那么你用$_GET,就可以获取参数(你可以理解为事件,动作,或者参数,该值在传递表单时与input的name一致)为wd的值123,多个参数用符连接,比如?an=0si=5理解为an参数的值为0与si参数的值为5。

所以你的代码$_GET[out]可以这样理解,用$_GET去获得浏览器地址栏out这个参数的值,因为他的地址是?out=login,所以获得的值为login

以上回答你满意么?

请问这句什么意思

HTMLManager是用户自定义的,在网上当然查不到

getHTMLHeader() ,getHTMLTitle() 是上面这个类的方法,你打开这个类就能看到了

HTML_JS_PATH 是常量 常量应该懂吧。。。

标签里的内容无法显示

script language=”javascript” type=”text/javascript”

var strtitle = ‘修改标题’;//修改后标题

document.title = strtitle;

/script

phpcms用GET标签如何在列表页和内容页使用

看情况了,内容页,可以直接调用一些相应的数据,例:{$title} {$url} {$thumb}但列表页,最好是用get来列出再调用:例:

{get sql=”select * from phpcms_content where catid =$catid order by listorder desc”}

lia href=”{$r[url]}” target=”_blank”{$r[title]}/a/li

{/get}

怎样在windows下配置ffmpeg-php

首先介绍下我使用的集成环境wamp。

PHP: php5.2.6

Apache: apache2.2.8

1.下载ffmpeg-php

2. 解压ffmpeg-php-win32-all.zip 后有下面几个文件:

avcodec-51.dll

avformat-51.dll

avutil-49.dll

php_ffmpeg.dll

pthreadGC2.dll

3. 将四个文件拷贝到windows\system32文件夹下面(小插曲:之前自己再配置时候按照网上的文章只拷贝两个文件 avcodec-51.dll, avformat-51.dll到这个文件,结果发现并不能配置成功。后来将后面avutil-49.dll, pthreadGC2.dll全部拷贝过去就成功了,很有可能这四个文件是有一定关联使用的。)

avcodec-51.dll, avformat-51.dll, avutil-49.dll, pthreadGC2.dll

4. 然后需要到apache\bin文件下找到php.ini文件下允许使用dll文件加入extension=php_ffmpeg.dll 并允许 extension=php_gd2.dll, extension=php_gettext.dll这两个

改动后如下(去掉前面的分号就代表允许执行)

extension=php_gd2.dll

extension=php_gettext.dll

extension=php_ffmpeg.dll

5. 重新启动wamp后使用phpinfo()函数看到一下信息配置: //我两个环境一个apache一个IIS,iis不用重启就生效了,apache没试不知道, add by aboc

ffmpeg

ffmpeg-php version 0.5.2.1

libavcodec version Lavc51.43.0

libavformat version Lavf51.12.2

ffmpeg-php gd support enabled

以上就表明ffmpeg在php环境中配置成功了。

6. 下面我们建立一个php的页面来测试是不是可以使用ffmpeg的一些函数功能。建立testvideo.php文件

代码如下:

?php

extension_loaded(‘ffmpeg’); //可不要

$ffmpegInstance = new ffmpeg_movie(‘C:\wamp\www\top10.mp4’); //这里要用绝对路径

echo “getDuration: ” . $ffmpegInstance-getDuration().”br” .

“getFrameCount: ” . $ffmpegInstance-getFrameCount().”br” .

“getFrameRate: ” . $ffmpegInstance-getFrameRate().”br” .

“getFilename: ” . $ffmpegInstance-getFilename().”br” .

“getComment: ” . $ffmpegInstance-getComment().”br” .

“getTitle: ” . $ffmpegInstance-getTitle().”br” .

“getAuthor: ” . $ffmpegInstance-getAuthor().”br” .

“getCopyright: ” . $ffmpegInstance-getCopyright().”br” .

“getArtist: ” . $ffmpegInstance-getArtist().”br” .

“getGenre: ” . $ffmpegInstance-getGenre().”br” .

“getTrackNumber: ” . $ffmpegInstance-getTrackNumber().”br” .

“getYear: ” . $ffmpegInstance-getYear().”br” .

“getFrameHeight: ” . $ffmpegInstance-getFrameHeight().”br” .

“getFrameWidth: ” . $ffmpegInstance-getFrameWidth().”br” .

“getPixelFormat: ” . $ffmpegInstance-getPixelFormat().”br” .

“getBitRate: ” . $ffmpegInstance-getBitRate().”br” .

“getVideoBitRate: ” . $ffmpegInstance-getVideoBitRate().”br” .

“getAudioBitRate: ” . $ffmpegInstance-getAudioBitRate().”br” .

“getAudioSampleRate: ” . $ffmpegInstance-getAudioSampleRate().”br” .

“getVideoCodec: ” . $ffmpegInstance-getVideoCodec().”br” .

“getAudioCodec: ” . $ffmpegInstance-getAudioCodec().”br” .

“getAudioChannels: ” . $ffmpegInstance-getAudioChannels().”br” .

“hasAudio: ” . $ffmpegInstance-hasAudio();

?

7.执行后如果拿到视频的一些信息如下就表示环境配置成功了,那我们就可以开始开发我们的视频转换了。

执行结果:

getDuration: 811.13336181641

getFrameCount: 12167

getFrameRate: 15

getFilename: C:\wamp\www\top10.mp4

getComment:

getTitle:

getAuthor:

getCopyright:

getArtist:

getGenre:

getTrackNumber: 0

getYear: 0

getFrameHeight: 240

getFrameWidth: 320

getPixelFormat: yuv420p

getBitRate: 269769

getVideoBitRate:

getAudioBitRate:

getAudioSampleRate: 48000

getVideoCodec: mpeg4

getAudioCodec: mpeg4aac

getAudioChannels: 2

hasAudio: 1

视频截图的话如下方法: //add by aboc

$ff_frame = $ffmpegInstance-getFrame(rand(1,$ffmpegInstance-getFrameCount())); //随机截取某一帧

$gd_image = $ff_frame-toGDImage();

imagejpeg($gd_image,’t.jpg’);

imagedestroy($gd_image);

echo ‘img src=”t.jpg” /’;

原创文章,作者:VJRJ,如若转载,请注明出处:https://www.506064.com/n/142921.html

(0)
VJRJVJRJ
上一篇 2024-10-14
下一篇 2024-10-14

相关推荐

发表回复

登录后才能评论