Login
网站首页 > 文章中心 > 其它

求一个超简单的php代码

作者:小编 更新时间:2023-09-19 07:22:46 浏览量:211人看过

最简单 php 代码

php

mysql_query("insert into guahao values('".$name."','".$nl."','".$shouji."','".$sname."','".$info."')");

求一段简单php代码

echo"开头";

{

$b = 'class'.$i;

echo $b;

}

echo"结尾";

或者

if($i==1) echo"开头";

if($i==1) echo"结尾";

//这不很简单吗

求很简单的PHP代码

$folder="C:\wamp\www\d";

$fp=opendir($folder);

while(false!=$file=readdir($fp)){

if($file!='.'?$file!='..'){

$file="$folder/$file";

$arr_file[]=$file;

if(is_array($arr_file)){

while(list($key,$value)=each($arr_file)){

echo?$value;

$key=file_get_contents($value);

if?(preg_match($_patten,$key))?{

file_put_contents($value,?$a);

closedir($fp);

求写个比较简单的php登陆页面代码

index.php 录入页代码form id="form1" name="form1" method="post" action="login.php"

tr

input type="text" name="User_name" id="User_name" / /td

/tr

tdinput type="Password" name="User_Password" id="User_Password" //td

td

input type="submit" name="button" id="button" value="提交" /

/table

/form login.php提交页代码?

error_reporting(0);

$mysql_username = "root";

$mysql_database ="first";

mysql_connect($mysql_servername , $mysql_username , $mysql_password);

mysql_select_db($mysql_database);

$U_name=$_POST['user_name'];

$U_passowrd=$_POST['user_password'];

if ($U_name $U_passowrd){

$sql = "SELECT * FROM admin WHERE U_name = '$U_name' and U_password='$U_passowrd'";

$res = mysql_query($sql);

$rows=mysql_num_rows($res);

if($rows){

header("location='c.php'");

exit;

echo "script language=javascriptalert('用户名密码错误');history.back();/script";

}else {

echo "script language=javascriptalert('用户名密码不能为空');history.back();/script";

求php代码!!!!实现一个简单的功能.

最好不要用中文文件名

$content = file_get_contents('shuju.txt');

echo 'shuju.txt 内容:'.$content;

if(isset($_GET['action'])){

if($_GET['action']==1){

file_put_contents('open.txt','');

echo '创建打开.txt';

file_put_contents('close.txt','');

echo '创建关闭.txt';

input type="button" value="打开" onclick="window.location='?action=1'"

php最经典,最基础的代码,适合入门的

PHP是一种可以嵌入到HTML中的运行在服务器端的脚本语言,所以为了体现PHP的特性我们可以分两种模式来实现PHP代码

①.、 PHP嵌入到HTML中,例如index.php

html

head/head

body

!--因为PHP嵌入到HTML中,所以需要完全区分PHP代码和HTML代码--

//输出hello?world

echo?'hello?world;

/body

/html

//输出

echo?'hello?world';

//不需要闭合标签

以上就是土嘎嘎小编为大家整理的求一个超简单的php代码相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!

版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章