创建php扩展名以连接mysql. [英] Create php extension to connect mysql.

查看:76
本文介绍了创建php扩展名以连接mysql.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我是新成员,希望得到您的支持,以创建一个PHP扩展以通过C ++驱动程序(Mysql连接器C ++)连接到mysql.非常感谢.


我想创建一个php扩展名(.dll文件),并且该文件可以连接和访问MySQL.我尝试创建一个简单的php扩展名"Hello World",它可以正常运行,但是当我尝试添加连接到MySQL的功能(使用C ++驱动程序连接器)时,在php中加载此扩展名时,它不起作用,Wamp也不起作用.伊尼.行动的目的,我想在托管我的网站时隐藏一部分我的php代码.希望得到您的支持,非常感谢.我很抱歉英语技能,我叫VietNamese. [/edit]

Hello all, I am new member, I hope receive your supports about creating a php extension to connect to mysql by C++ driver (Mysql connector C++). Thank you very much.

[edit - copied from comment to first answer - Peter-in-2780]
I want to create a php extension (.dll file) and this file can connect and access MySQL. I have try create a simple php extension "Hello World" and it runs normally, but when I try to add function connect to MySQL (use C++ driver connector), it do not work and Wamp do not work when load this extension in php.ini. Purpose of action, I want to hide a piece of my php code when up host my site. I hope receive your supports,thank you very much. I am sorry about English skill, I am VietNamese. [/edit]

推荐答案

您要做什么?如果您希望您的PHP代码访问MySQL,则已经内置在PHP中.同样,C ++可以直接连接到MySQL.


您无需执行任何操作即可向网站访问者隐藏php代码.例如,看看 [ ^ ]该站点在我坐着的地方不到一米的计算机上运行,​​我敢打赌您看不到任何生成该页面的PHP或MySQL数据库存储一切.这是在非常简单的WAMP设置上运行的.不涉及C ++.如果您真的需要它,我可以向您展示我的Apache和PHP配置的一些信息.
[/edit]

[edit2链接/中的固定URL/]
What are you trying to do? If you want your PHP code to access MySQL, that''s already built in to PHP. Likewise, C++ can interface to MySQL directly.

[edit - added this after updating question from comment - Peter-in-2780]
You do not need to do anything to hide php code from visitors to your site. For example, have a look at this[^] That site is running on a computer within a metre of where I''m sitting, and I bet you can''t see any of the PHP that generates the page or the MySQL database that stores everything. This is running on a very straightforward WAMP setup. There is no C++ involved. If you really need it, I can show you some bits of my Apache and PHP config.
[/edit]

[edit2 fixed URL in link /]


这篇关于创建php扩展名以连接mysql.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆