PHP DBF LAN
在本地电脑安装ODBC驱动,PHP 链接DBF文件。。如果文件是放在本地磁盘上,只要输入c:\BatMan\Daten\histwech.dbf即可使用,
但是如果要链接局域网里面其他电脑上的DBF文件,应该如何定义这个文件的绝对路径呢?
求大神指导。。
PS ..上次有位大神说如此就写\\pc69\c$\xxx.dbf ,测试了无效果啊,PC69是局域网内电脑的名字,我们是应该使用名字还是该使用IP地址呢?为什么用这个方式连接本地磁盘不行呢。。假设本机叫pc70..如果这样写
$add='\\pc70\c$\BatMan\Daten\histwech.dbf';
报错如下>Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Visual FoxPro Driver]Fox Error 1, SQL state S1000 in SQLConnect in C:\AppServ\www\batman\batmanliste.php on line 34
Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in C:\AppServ\www\batman\batmanliste.php on line 132
求大神解释下啊。。
回复讨论(解决方案)
你的链接文件源码拿出来看看??
$add='\\\\192.168.1.70\c$\BatMan\Daten\histwech.dbf';
$e="Driver={Microsoft Visual FoxPro Driver};SourceType=DBf;SourceDB=".$add.";Exclusive=No;NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO;";
$odbc=odbc_connect($e,'','');
本地机子IP地址是192.168.1.70 本地磁盘是c 或者D 。。这样写都是可以的。。
但是局域网内例如 PC69, IP地址是192.168.69 磁盘也是C。。
这样写$add='\\\\192.168.1.69\c$\BatMan\Daten\histwech.dbf';就不可以。。
再着,我在自己电脑上进行了局域网连接,把\\PC69\C创建为Y: 然后尝试把$add='\\\\192.168.1.70\Y$\BatMan\Daten\histwech.dbf';这样也是不行。。。
求大神快帮忙啊。。
同一资源定位:
//主机名/共享名/路径/文件名
或
//IP/共享名/路径/文件名
你原来的 C$ 是假定 C 盘没有做显式的共享,而直接取系统默认的共享名
你可以在命令行或vfp中这样使用,但不一定能在 php 中这样使用
这取决于 php 编译时的开关状态
你或许需要在 php 服务器上对其他机器上的 dbf 做 ODBC 数据源创建
大神,我看不懂你说的啊。。
急死的了。。
什么是同一资源定位啊?什么又是共享名呢??
如果我必须要用PHP连接呢?到底该怎么写啊?
我只是想读取局域网内其他机子上的dbf文件、我的报错在odbc_connect上都是OK的。但是在读取sql语句的时候报错!并且都是说找不到文件,所以我觉得应该是SourceDB的书写上面有错误。。但是我又不会写啊。
求介绍啊!

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


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

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

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software