问题标签 [ini-set]
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.
php - 在 PHP 中通过 ini_set() 禁用日志记录?
我想在我的服务器上禁用日志记录(access_log
和)。error_log
这可以通过函数实现ini_set()
吗?如果是,你是怎么做的?
php - 我应该在我网站的每个页面上设置 ini_set() 还是在第一页上设置?
我想通过 ini_set() 设置两个 ini 指令:
和
仅在第一页(尤其是第一页)上设置它会起作用,还是应该在项目的每个页面上提供它?
如果我应该在每个页面上都使用它:如果我无法访问php.ini
服务器上的 PHP 配置文件,是否还有其他选项可以更改配置设置?我可以用其他方式设置吗?(例如通过使用另一个 PHP 函数或.htaccess
)
wordpress - 如何消除有关 ini_set 的错误警告?
我的 wordpress 错误日志充满了这条消息:
该行内容如下:ini_set( 'display_errors', 0 );
关于如何消除错误警告的任何建议?
php - register_argc_argv 不能通过 ini_set 设置
我有以下问题...
我有一个网络应用程序,我想使用
在我的 php.ini 中它已关闭
现在的问题是,我无法直接访问 php.ini 文件,因为它位于托管服务器上。实际上,即使我可以,我也不想打开主值。
在我index.php
的第一行是:
在 config.php 我的源代码是这样开始的:
但它不会打开。
问题:
难道我做错了什么 ?
有解决方案吗?
这会被提供商阻止吗?
我试过的:
- ini_set("register_argc_argv", "1");
- ini_set("register_argc_argv", 1);
- ini_set("register_argc_argv", "On");
- ini_set("register_argc_argv", true);
没有PHP:如何覆盖 register_argc_argv?不是重复的,因为
- 这个答案对我不起作用
- 你看到我的第一行,之前没有执行任何操作
php - ini_set('post_max_size', '200M') 在 php 5.4 中不起作用
ini_set('post_max_size', '200M') 在 php 5.4 中不起作用,我使用了以下方法。.htaccess , user.ini , php.ini , php5.ini 但它对 post_max_size 没有影响。它保持在64M。它改变了内存限制和执行时间,但没有改变 post_max_size。
phpinfo(); 系统信息 PHP 版本 5.4.29 系统 Linux gator4143.hostgator.com 3.2.54 #9 SMP Thu Feb 13 08:17:11 CST 2014 x86_64 Virtual Directory Support disabled
php - Internal Server Error with a long executing PHP script
I have one large PHP script, which is built up of separate sections:
- RSS feed fetching (SimplePie)
- storing items in MySQL DB
- check item content for images (checking for img tags with DOMDocument())
- generating crops from each image found (using PHP Image Magician)
Each section takes around 10-20 MB of server RAM. I checked this using:
My server has a RAM of 300 MB, and just to be sure, I manually set the max_execution_time to 300 for long execution time and bumped up any memory limit just in case.
I have verified the memory limit and execution time with:
However, still, after about 90-120 seconds, the script just stops and I get an Internal Server Error message.
Where exactly is my problem ?
php - 日期格式时区问题
我正在尝试将静态时区设置为 HST(夏威夷时间)的日期,因此无论您身在何处,它都会显示夏威夷的时间。这是我的代码。
回声 2014 年 9 月 3 日下午 3:14,这是美国东部时间。
我希望它在 2014 年 9 月 3 日上午 9:14 回响
php - 会话不超过一小时有效
我有一个关于 SESSION 的问题。我需要一个 12 小时的会话,所以我必须在早上登录并且可以整天访问我的网站。
我在 .htaccess 中做了以下操作
在我的 index.php 中,我插入了以下代码:
我得到的结果:
但是,如果我在一个小时的网站上没有做任何事情,会话将被破坏。
谁能帮帮我?
php - ini_set 没有设置 php.ini 中的值
我正在尝试设置一个新目录upload_tmp_dir
并设置一个新目录,upload_max_filesize
但它不起作用......我正在显示结果,但我正在恢复旧的(默认 php.ini 设置)......
现在让我们显示结果:
原始的 php.ini 默认设置显示在屏幕上,而不是我的新设置。
可能是什么原因?
php - .htaccess :: 无法设置 upload_tmp_dir
看起来像一个非常简单的任务,但它不工作......我正在尝试upload_tmp_dir
在我的 .htaccess 文件中设置为 ROOT 目录......
我正在打印结果,它与我的 php.ini 上的默认值保持一致
爱荷华...不工作。
我知道通过以下方式设置它是不可能的:
我在这里做错了什么?