mysql安装测试报错
Fatal error: Call to undefined function mysql_connect() in C:\myenv\apache\htdocs\test.php on line 3
1:我检查了mysql已经启动
extension=php_mysql.dll
extension=php_mysqli.dll前面分号已经去掉
2:路径已经更改
extension_dir = "C:/myenv/php/ext"
3:php5ts.dll
libmysql.dll文件已经粘贴到WINDOWS下的system下
4:apache的php模块已经加载
LoadModule php5_module C:/myenv/php/php5apache2_2.dll
PHPIniDir "C:/myenv/php"
AddType application/x-httpd-php .php .phtml
5测试代码
$conn=mysql_connect("localhost","root","1985032468root");
if($conn){
echo"链接到数据库成功";
}else{
echo"链接数据库失败";
}
?>
请大侠赐教!!!感激涕零!!!
回复讨论(解决方案)
Fatal error: Call to undefined function mysql_connect()
说的很清楚了!你没有加载 php_mysql 扩展
在 httpd.conf 中加一条
LoadFile "C:/myenv/php/php5ts.dll"
看看
重启apache后还是一样的报错啊。。。。到底哪里出了问题啊
phpinfo(); 看看 Loaded Configuration File 加载的php.ini 是否是你修改的php.ini 。
这些修改完了要重启服务器.
命中 !!!phpinfo()中显示的是c:/WINDOWS 如何解决啊大神
jordan102
一起混吧
大神一语命中,现在连接成功。。感激涕零!!!!
.........

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Following its high-profile acquisition by Facebook in 2012, Instagram adopted two sets of APIs for third-party use. These are the Instagram Graph API and the Instagram Basic Display API.As a developer building an app that requires information from a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor

Dreamweaver Mac version
Visual web development tools
