网站制作前的图片路径,软件开发模型的作用,网站域名哪里买,上海网站建设升级PHP开发环境搭建及常用的数据库操作常见的web服务器#xff1a;httpd(Apache)、nginxPHPTomcat#xff1a;jsphtmlwin#xff1a;IIS客户端#xff1a;IE、firefox、chrome、手机浏览器(Browser)PHP开发环境#xff1a;LAMPLinux Apache Mysql PHP或者LNMPLinux Nginx Mys…PHP开发环境搭建及常用的数据库操作常见的web服务器httpd(Apache)、nginxPHPTomcatjsphtmlwinIIS客户端IE、firefox、chrome、手机浏览器(Browser)PHP开发环境LAMPLinux Apache Mysql PHP或者LNMPLinux Nginx Mysql PHPLinuxApacheMysql/MariaDBPerl/PHP/Python搭建动态网站之CentOSyum -y install httpd mariadb mariadb-server php php-mysqlhttpd就是Apache的一个版本mariadbMySQL数据库的客户端mariadb-server服务器端php-mysqlphp操作MySQLsystemctl start httpd启动Apachesystemctl enable httpd设置开机自启systemctl start mariadb启动数据库systemctl enable mariadb开机自启mysqladmin -u root password 123456设置数据库账户和密码(默认为空)登录mysql数据库验证mysql -uroot -p123456网站根目录/var/www/htmlPHP基本信息phpinfo();?php7.3对MySQL数据库基本操作之增删改查$server localhost:3306;$username root;$password 123456;$dbname mydb;$link mysqli_connect($server,$username,$password,$dbname); //数据库连接if($link){echo 正常;}else{echo 异常;}mysqli_set_charset($link,UTF8); // 设置数据库字符集echo ;//数据库插入数据/*$sql INSERT INTO users(id,NAME,age,sex) VALUES(5,zhangsan,18,male),(6,lisi,28,male);$result mysqli_query($link,$sql);if($result){echo 插入成功;}else{echo 插入失败;}*///删除数据/*$sql delete from users where id1;$result mysqli_query($link,$sql);if($result){echo 删除成功;}else{echo 删除失败;}*///修改数据/*$sql update users set age19 where id4;$result mysqli_query($link,$sql);if($result){echo 修改成功;}else{echo 修改失败;}*///查询数据$sql select * from users;$result mysqli_query($link,$sql);$data mysqli_fetch_all($result); // 从结果集中获取所有数据print_r($data);?