是否有隐藏的宝石可以在运行时卸下特定的扩展?
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
是否有隐藏的宝石可以在运行时卸下特定的扩展?
不, s < a href=" "https://bugs.php.net/bug.php?id=53957" rel = "nofollow"\\ strong > 是不可能的 ,而且很可能永远也不会:
[2011-02-08 11:34 UTC] [email protected]
extension unloading on a per-request basis simply isn t feasible from a performance point of view. And you obviously can t unload and leave it unloaded for the next request because that next request may be for a page that expects the extension to be there.
然而,使用 dl ()
还是不鼓励使用 -- -- 最近版本只有CLI版本。
从另一个角度看:不可能从正在运行的 PHP 口译员中删除扩展, 因为它可能已经以不可逆转的方式修改了 PHP 口译员的状况。 例如, 装入后有许多扩展注册分类; 这些模块中没有代码可以解除这些分类的卸载。 更糟糕的是, 如果您的脚本已经运行, 它可能已经包含这些分类的事例, 如果被操作的类别定义丢失, 将会让口译员崩溃 。
至于变通办法,如果使用PHP CLI或其内置服务器 (>>php -S
),您可以指定 -n
/ -no-php-ini
忽略您的 php.ini
,这样它就可以在运行时卸下您的所有扩展名。 可用于测试 。
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
I found this script online that creates a thumbnail out of a image but the thumbnail image is created with poor quality how can I improve the quality of the image. And is there a better way to create ...
如何确认来自正确来源的数字。
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...
I wonder there is a way to post a message to a facebook business page with cURL? thanks
I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...
How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...