简体   繁体   中英

adding a function to php.ini

I used the function htmlentities() in my php script, but the server says: "undefined function"

After some searching, I understand that the php installation on my webhost does not include that function, and that I can add the function by changing the php.ini file, but I have spent many hours searching, and have not found any information on how to actually do this.

Any suggestions?

If your webhost's PHP install doesn't have something so basic as htmlentities() , it's time to get a new webhost. If it's that bizarrely locked down, you're also not likely to be able to tweak php.ini ...

我在手册中没有看到任何说明该功能在您启用的可选模块中的内容-您只需要PHP 4或5。确定要调用正确的功能吗?

It's surprising that this would be unavailable, but have you tried the alternate htmlspecialchars? It will deal with the ones that are most important to deal with.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM