php修改上传文件大小

在PHP中,可以通过修改配置文件或使用ini_set()函数来修改上传文件大小限制。 通过修改php.ini文件 找到php.ini文件,通常位于服务器的php安装目录下。 打开php.ini文件,找到”upload_max_filesize”和”post_max_size”两个配置项。 修改它们的值,例如将它们都设为”10M”,表示最大上传文件大小为10MB。 保存php.ini文件并重启服务器,使配置生效。 vim /usr/local/php/lib/php.ini ; Maximum allowed size for uploaded files. upload_max_filesize = 500M ; Maximum size of POST data that PHP will accept. post_max_size = 500M systemctl restart rc-local.service

Published
Categorized as web-php

mysql 远程端口3307

vim /etc/my.cnf [client] #password = your_password port = 3307 socket = /tmp/mysql.sock systemctl restart rc-local.service vim frpc.ini [mysql] type = tcp local_ip = 10.168.1.115 local_port = 3306 remote_port = 3307 custom_domains = 39.100.102.12 systemctl restart frpc.service root135@root135:~/Desktop$ mysql -u root -p -h 39.100.102.12 -P 3307 Enter password: Welcome to the MariaDB monitor. Commands end with… Continue reading mysql 远程端口3307

Published
Categorized as mysql

mysql update delete

mysql> update user set password=password(‘123456′) where user=’root’ and host=’root’ or host=’localhost’; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> update mysql.user set host=’10.168.1.115′ where user=’root’ and host=’localhost’; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed:… Continue reading mysql update delete

Published
Categorized as mysql

bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

解决方式: 把configure文件中的“^M”去掉就可以了。 方法1: 安装:dos2unix sudo add-apt-repository universe apt-get install dos2unix dos2unix configure 把configure文件转化成linux编码格式。 方法2: 在没有dos2unix情况下 cat ./configure.sh | tr -d ‘/r’ > temp.sh mv temp.sh configure.sh cat ./configure.sh | tr -d ‘/r’ > temp.sh mv temp.sh configure.sh

Published
Categorized as web-php

rc.local开机启动不生效的办法

cd /etc/rc.d/ chmod +x rc.local [root@115 rc.d]# systemctl status rc-local.service ○ rc-local.service – /etc/rc.d/rc.local Compatibility Loaded: loaded (/usr/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: disabl> Active: inactive (dead) Docs: man:systemd-rc-local-generator(8) [root@115 rc.d]# systemctl enable rc-local.service The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means… Continue reading rc.local开机启动不生效的办法

Published
Categorized as web-php