问题标签 [php4]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
260 浏览

html - 在 PHP4 中过滤/解析/修改来自 html 内容的电子邮件和 href

我不验证电子邮件。我想要做的是在(html)字符串中找到(然后更改)3种不同类型的“电子邮件”内容:

  1. 一个普通的电子邮件:例如 user@test.com
  2. 邮件地址:例如<a href="mailto:user@test.com">user@test.com</a>
  3. 别名href:例如<a href="mailto:user@test.com">user's email</a>

然后,我将把每个示例转换为自定义 html 字符串,然后由 JS 修改(通过 Spamspan 进行反垃圾邮件收集):

所以你可以看到我还必须找到这些类型的输入,将电子邮件解析为用户、域和(可选)显示值。我目前正在努力使用正则表达式来查找这些电子邮件......在 PHP 中解析它们应该是直截了当的。

编辑:目前,我被锁定在 PHP4 中。将查看http://php-html.sourceforge.net/以解析 HTML。

0 投票
1 回答
370 浏览

php - 只允许某些(动态)IP 访问网站主管

好的

我有 4 个动态 ip,为了获得这些 IP,我需要gethostbyname('domain_name.com');在 4 个域名上运行一个我总是解析为允许访问此目录的唯一 4 个 IP。

这对我来说很容易在页面上的 PHP 脚本上执行,但我很困惑如何对目录执行此操作?

谢谢!!

0 投票
1 回答
1863 浏览

php - PHP: Warning: array_merge_recursive(): recursion detected

I have a list of arrays (unknown amount), I need to merge all of them recursively.

So what I did what create an array of all of those arrays and pass them into this function:

Most of the time this works just like I expected it to, but sometimes I get this error:

Warning: array_merge_recursive(): recursion detected in ... on line 89

Don't know why?

Any ideas?

Thanks!!

UPDATE

the structure is like this:

Which I then changed to:

and that fixed the issue :)

Note anyone who can explain WHY my change fixed it, will get the accepted answer!

0 投票
3 回答
1753 浏览

php4 - export mysql database to excel by php

I want to export my database to an excel file by php,I need a source code in php to do this

0 投票
2 回答
196 浏览

php - 可搜索行为和 PHP 4.xx 的问题

我正在尝试使用此处托管的可搜索行为:http ://code.google.com/p/searchable-behaviour-for-cakephp/ 为了使用现有数据初始化 search_index 表,我使用了这个:http://code。 google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=1&q=controller回复 2 号创建类 SearchController。

该代码在运行 PHP5 的本地测试服务器上运行良好。但是,服务器有 PHP 4,当我在服务器上尝试代码时,它给出了这个错误:

它真的与 PHP 版本有关,还是我犯了一些逻辑错误?

0 投票
1 回答
689 浏览

sphinx - sphinx中searchd协议错误的问题

我收到错误

有谁知道为什么会这样,当我运行 sphinx api(ver 0.9.9-win32)的 test2.php 时。

0 投票
1 回答
72 浏览

login - 我如何使用 yahoo、twitter、facebook 等登录系统

在许多网站我可以看到 替代文字 http://img718.imageshack.us/img718/4633/15494794.gif

我怎么能这样做是必须告诉每家公司或什么?

0 投票
3 回答
3065 浏览

html - PHP:在body标签之后注入iframe

我想在 body 标签的开始下方放置一个 iframe。这有一些问题,因为 body 标签可以有各种属性和奇怪的空格。我的猜测是这将需要正则表达式才能正确执行。

编辑:此解决方案必须与 php 4 一起使用,性能是我关心的问题。这是为了这个http://drupal.org/node/586210#comment-2567398

0 投票
3 回答
651 浏览

php - 这个 PHP4 类做 AES 加密有什么问题?

当我解密用这个函数加密的东西时,解密的版本不等于原始版本。

0 投票
4 回答
2057 浏览

php - 如何在 PHP4 中将类属性设为私有?

在 PHP4 中没有公共、私有等。所以我想知道是否有某种解决方法,以便我可以将类的属性设为私有,并且只能通过 getter/setter 访问

谢谢!!