我搜索了很多关于如何启用php_fileinfo扩展,但是在我的php.ini文件中并且它不包含任何php_fileinfo的东西,我在专用的Windows服务器上使用PHP 5.4。
我应该添加一个extention = php_fileinfo.dll,它会起作用吗?
答案 0 :(得分:0)
添加#include <Servo.h>
#define servomaxx 114//max degree servo horizontal (x) can turn
#define servomaxy 120//max degree servo vertical (y) can turn
#define screenmaxx 480 //max screen horizontal (x) resolution
#define screenmaxy 320 //max screen vertical (y) resolution
#define servocenterx 90 //center position on (x)
#define servocentery 90 //center position on (y)
#define servopinx 9 //digital pin for servo x
#define servopiny 10 //digital pin for servo y
#define baudrate 9600 //com port speed.
#define servorange 180
int x100byte;
int x010byte;
int x001byte;
int posx_taken=0;
int posy_taken=0;
int posx = 0;
int posy = 0;
Servo servox;
Servo servoy;
void setup()
{
Serial.begin(9600);
pinMode(servopinx,OUTPUT);
pinMode(servopiny,OUTPUT);
pinMode(13, OUTPUT);
servoy.attach(servopiny);
servox.attach(servopinx);
servox.write(servocenterx);
delay(200);
servoy.write(servocentery);
delay(200);
}
void loop()
{
if (Serial.available() > 3) {
x100byte = Serial.parseInt();
delay(5);
x010byte = Serial.parseInt();
x001byte = Serial.parseInt();
Serial.println("x100byte");
Serial.println(x100byte);
Serial.println("x010byte");
Serial.println(x010byte);
posx_taken=x100byte;
posy_taken=x010byte;
if ((posx_taken>screenmaxx) || (posy_taken>screenmaxy)) {
Serial.println("Wrong number-too big values!");
} else {
if (posx_taken == screenmaxx) {
posx = servomaxx;
} else if (posx_taken == 0) {
posx = 68;
} else if (posx_taken == (screenmaxx / 2)) {
posx=servorange / 2;
} else {
posx = ((posx_taken * 24) / (screenmaxx / 2)) + 66;
}
if (posy_taken == screenmaxy) {
posy = 120;
} else if (posy_taken == 0) {
posy = 60;
} else if (posy_taken == (screenmaxy / 2)){
posy = 90;
} else {
posy = ((posy_taken * 30) / (screenmaxy / 2)) + 60;
}
}
servox.write(posx);
servoy.write(posy);
if (x001byte == 180) {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
}
}
}
解决了这个问题!有关更多信息,请阅读本文:https://community.xibo.org.uk/t/how-do-i-enable-fileinfo-in-php/78