A php update problem
$conn = dbo.mssql_connect("61.164.111.245","yon","123456");
$dbname = mssql_select_db("yong1",$conn) or die ("Database does not exist or is unavailable");
?>
I have tested this generation on this machine without any problems
$action=$_POST["action"];
if ($action=="Submit"){
$id=$_POST["id"];
$title=$_POST["title"];
$come=$_POST["come"];
$exitt=$_POST["exitt"];
$content=stripslashes(trim($_POST["content"]));
$uptime=$_POST["uptime"];
if($id==""){
echo "";
}
if($title==""){
echo"";
}
if($come==""){
echo"";
}
if($exitt==""){
echo"";
}
if ($content==""){
echo "";
}
if($uptime==""){
echo "";
}
$exec="update anew set title='".$title."', come='".$come."', exitt='".$exitt."', content='".$content."' , uptime='".$uptime."' where id=".$id;
$query=@mssql_query($exec);//This is line 107
if($query){
echo"";
mssql_close();
}
}
?>
I copied the code but when I ran it on the server,
appeared.
Warning: mssql_query(): 3 is not a valid MS SQL-Link resource in F:yongjiayjaadmindianziup.php on line 107
[ ]
The best answer [url=http://www.111cn.cn/bbs/space.php?username=E网Xiaoyao]Link tag EwangXiaoyao[/url]
[url=http://www.111cn.cn/bbs/space.php?uid=58710]Link tag[img]http://www.111cn.cn/server/avatar.php?uid=58710&size=small[ /img][/url] The sql server does not start or the SQL ID is wrong. The reason is that you have the SQL SERVER service on your local machine but not on the space, or you have a default link on your local machine and do not need mssql_connect to establish a link. There is no space
[ ]
D8888D reply content------------------------------------------------- ----------
The sql server does not start or the SQL ID is wrong. The reason is that you have the SQL SERVER service on your local machine but not on the space. Or you have a default link on the local machine and do not need mssql_connect to establish a link, but there is no connection on the space
[ ]
D8888D reply content------------------------------------------------- ----------
Where is the code to connect to the database?
D8888D reply content------------------------------------------------- ----------
Is the database used by the server sql server?
D8888D reply content------------------------------------------------- ----------
$exec="update anew set title='".$title."', come='".$come."', exitt='".$exitt."', content='".$content."' , uptime='".$uptime."' where id='".$id,"'";
Copy the code and try it like this. I guess $id is used as a link.
D8888D reply content------------------------------------------------- ----------
I’m dizzy, the connection is not even initialized
D8888D reply content------------------------------------------------- ----------
The link code is posted. Come and take a look. I’m going crazy
D8888D reply content------------------------------------------------- ----------
$conn = mssql_connect("61.164.111.245","yon","123456");
$dbname = mssql_select_db("yong1",$conn) or die ("Database does not exist or is unavailable");
echo $conn;
//If that doesn’t work, contact your ISP and ask him to enable the MSSQL extension for you. I’ve never used DBO before
?>
Copy code
D8888D reply content------------------------------------------------- ----------
Enable MSSQL extension
Why is it open
I manage the server myself
If it were managed by someone else, I would have called them and asked them to take care of it

TooptimizePHPcodeforreducedmemoryusageandexecutiontime,followthesesteps:1)Usereferencesinsteadofcopyinglargedatastructurestoreducememoryconsumption.2)LeveragePHP'sbuilt-infunctionslikearray_mapforfasterexecution.3)Implementcachingmechanisms,suchasAPC

PHPisusedforsendingemailsduetoitsintegrationwithservermailservicesandexternalSMTPproviders,automatingnotificationsandmarketingcampaigns.1)SetupyourPHPenvironmentwithawebserverandPHP,ensuringthemailfunctionisenabled.2)UseabasicscriptwithPHP'smailfunct

The best way to send emails is to use the PHPMailer library. 1) Using the mail() function is simple but unreliable, which may cause emails to enter spam or cannot be delivered. 2) PHPMailer provides better control and reliability, and supports HTML mail, attachments and SMTP authentication. 3) Make sure SMTP settings are configured correctly and encryption (such as STARTTLS or SSL/TLS) is used to enhance security. 4) For large amounts of emails, consider using a mail queue system to optimize performance.

CustomheadersandadvancedfeaturesinPHPemailenhancefunctionalityandreliability.1)Customheadersaddmetadatafortrackingandcategorization.2)HTMLemailsallowformattingandinteractivity.3)AttachmentscanbesentusinglibrarieslikePHPMailer.4)SMTPauthenticationimpr

Sending mail using PHP and SMTP can be achieved through the PHPMailer library. 1) Install and configure PHPMailer, 2) Set SMTP server details, 3) Define the email content, 4) Send emails and handle errors. Use this method to ensure the reliability and security of emails.

ThebestapproachforsendingemailsinPHPisusingthePHPMailerlibraryduetoitsreliability,featurerichness,andeaseofuse.PHPMailersupportsSMTP,providesdetailederrorhandling,allowssendingHTMLandplaintextemails,supportsattachments,andenhancessecurity.Foroptimalu

The reason for using Dependency Injection (DI) is that it promotes loose coupling, testability, and maintainability of the code. 1) Use constructor to inject dependencies, 2) Avoid using service locators, 3) Use dependency injection containers to manage dependencies, 4) Improve testability through injecting dependencies, 5) Avoid over-injection dependencies, 6) Consider the impact of DI on performance.

PHPperformancetuningiscrucialbecauseitenhancesspeedandefficiency,whicharevitalforwebapplications.1)CachingwithAPCureducesdatabaseloadandimprovesresponsetimes.2)Optimizingdatabasequeriesbyselectingnecessarycolumnsandusingindexingspeedsupdataretrieval.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Chinese version
Chinese version, very easy to use
