我是Ubuntu的新手我想使用PECL id3包,所以我从Windows转移到了Ubuntu.
我安装了php5,apache2,libcurl,php5-dev,php-pear但是当我尝试安装php_http扩展时它出错了.它要求zlib和libcurl,我只需按回车键选择默认值,然后在最后发生错误:
maniteja@maniteja:~$ sudo pecl install pecl_http
downloading pecl_http-2.0.4.tgz ...
Starting to download pecl_http-2.0.4.tgz (152,350 bytes)
.....done: 152,350 bytes
64 source files, building
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
Enable extended HTTP support [yes] :
where to find zlib [/usr] :
where to find libcurl [/usr] :
where to find libevent [/usr] :
building in /tmp/pear/temp/pear-build-rootcjY5MM/pecl_http-2.0.4
running: /tmp/pear/temp/pecl_http/configure --with-http --with-http-zlib-dir=/usr --with-http-libcurl-dir=/usr --with-http-libevent-dir=/usr
checking for grep that handles …
Run Code Online (Sandbox Code Playgroud) 任何人都可以告诉我如何替换除了下划线和句号符号之外的字符串中的所有特殊字符.而且我一直在努力了解如何使这个替换模式阅读PHP
手册及其如此令人困惑的初学者喜欢我是否有任何其他文档或教程,这对初学者来说很容易,所以我不必发布这样的另一个问题,每次我想要使用这个功能时给你的人带来麻烦?
preg_replace('/[^a-zA-Z0-9]/', '', $string);
Run Code Online (Sandbox Code Playgroud)
这是我所拥有的它取代所有特殊字符,但我想除了_
和 .
.
这是我的代码,但它说replace is not declared in this scope
这不是正确的语法?
#include<iostream>
#include<string>
using namespace std;
int main ()
{
string string_to_edit;
cout<<"Enter a string to replace all the vowels:"<<endl;
cin>>string_to_edit;
string output_string=replace(string_to_edit.begin(),string_to_edit.end(),"a","x");
cout<<output_string<<endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud) 我一直在尝试这个,现在仍然无法找到答案,当我尝试 sudo pecl install id3
这个错误发生
downloading id3-0.2.tgz ...
Starting to download id3-0.2.tgz (20,693 bytes)
.....done: 20,693 bytes
4 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
If the command failed with 'phpize: not found' then you need to install php5-dev packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed
Run Code Online (Sandbox Code Playgroud)
请帮忙 !!!我已经安装了php5-dev.
即时通讯使用以下代码来获取客户端IP当我尝试通过它获取我的IP它说103.245.196.41但我的实际IP是10.100.210.5.我的代码:
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip=$_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (!empty($_SERVER['REMOTE_ADDR'])) {
$ip=$_SERVER['REMOTE_ADDR'];
}
Run Code Online (Sandbox Code Playgroud) 嗨,这是我用来播放喊播演员流的代码,工作正常,但无法更改音量,这是错误的,我是新手。
<script>
function audioobject()
{
var link = new Audio('http://107.155.72.250:8000/;.mp3');
return link;
}
function startradio()
{
audioobject().play();
}
function changevolume(amount)
{
audioobject().setVolume(amount);
}
</script>
<input type="button" id="play" value="Play" onclick="startradio()"/>
<input type="range" id="vol" max="1" min="0" step="0.01" onchange="changevolume(this.value)"/>
Run Code Online (Sandbox Code Playgroud)