ini

my_config.ini vs my_config.php

不羁岁月 提交于 2019-11-29 16:59:15
问题 At work we use a .ini file to set variables prior to calling the rest of the framework (I think it goes function getConfigVars(){ //read my_config.ini file .... //call framework } and I have always wondered if there was a benefit to doing it that way. It seems to me that you then have to write access rules to stop people from looking at it from the web and php has to parse it and understand it. So, why use my_config.ini rather than my_config.php? It is not like anyone should be touching it

php upload and internal server error

安稳与你 提交于 2019-11-29 14:30:12
i am using an html form with php to upload data to mysql. the form is working properly when i am using it on my laptop (wamp) but when i uploaded the site on my dedicated server (ispconfig) get this error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. i tried changing the values of the php.ini in post_max_size 64M upload_max_filesize 64M max_input_time 3000 max_execution_time 3000 and the ones in the apache also in memory_limit 96M post_max_size 64M upload_max_filesize 64M but i still cant upload. thank you for

php parse_ini_file oop & deep

僤鯓⒐⒋嵵緔 提交于 2019-11-29 12:10:00
I would like to make use of somehting like [parse_ini_file][1]. Lets say for instance I have a boot.ini file that I will load for further procedure: ;database connection settings [database] type = mysql; host = localhost; username = root; password = ""; dbName = wit; However, I would like to have it in a different way as the php array would be: $ini['database']['whatever'] So first of all I would like to have my boot.ini like this structure: ;database settings (comment same style) db.host1.type = mysql; db.host1.host = localhost; db.host1.username = root; db.host1.password = ""; db.host1

Ini Files - Read Multi Lines?

允我心安 提交于 2019-11-29 02:13:23
I am aware that Ini Files are meant for single lines of information, needless to say I am trying to read/write multi lines to and from the Ini - without much success (I always seem to do things the hard way!) Lets say my Ini File when saved, looks like this: [richardmarx] Filenames=hazard children of the night right here waiting Suppose the Ini File is built dynamically (ie, the richardmarx and the Filenames are not know, but unique - they could literally be anything). How would I be able to read the Ini File? In this example then, how could I put richardmarx into a TEdit, and the Filenames

PHP | “The requested PHP extension bcmath is missing from your system.”

纵然是瞬间 提交于 2019-11-29 02:11:02
问题 Greetings fellow developers, I am trying to use composer for a PHP project of mine on a development server I recently booted up and for some reason I am unable to. I successfully installed composer, however, when I try to run the require command I get the following error: root@webserver:/var/mypersonal/index# composer require php-amqplib/php-amqplib PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_openssl.dll' - /usr/lib/php/20151012/php_openssl.dll: cannot

eclipse ini configuration

穿精又带淫゛_ 提交于 2019-11-29 01:38:27
问题 actually i and my friend are trying to learn and use eclipse 3.4 and we are having some heap memory issue while working, and my friend suggested to increase the memory allocation to eclipse ide as he has 4GB RAM and he wants to allocate enough heap, allocate decent perm size, and enable parallel garbage collection to this eclipse ide. we people are unable to achieve this by modifying the eclipse.ini file and he wants to allocate 1GB of RAM to eclipse. kindly please help us in this Thanks 回答1:

How to save application settings in a config file?

家住魔仙堡 提交于 2019-11-28 23:59:21
I am developing a program that has a settings window in which I can change various parameters for my program. What is the best way to read/save them in some kind of config file? I know that some software and games use .ini files or similar system. How can I achieve this in Python? The Python standard library includes the ConfigParser module , which handles ini-style configuration files for you. It's more than adequate for most uses. Another popular option for configuration files is JSON - it's a simple notation which has good support from a wide range of languages. Python has the json module

How can I access INI files from Perl?

∥☆過路亽.° 提交于 2019-11-28 23:25:56
What is the best way to parse INI file in Perl and convert it to hash? I prefer to use Config::IniFiles module. Ivan Nevostruev If you like more perlish style then try Tie::Cfg . Sample: tie my %conf, 'Tie::Cfg', READ => "/etc/connect.cfg"; $conf{test}="this is a test"; The best way is to make use of available modules in CPAN as what others have suggested. Below is just for your own understanding, let's say you have ini file like this: $ more test.ini [Section1] s1tag1=s1value1 # some comments [Section2] s2tag1=s2value1 # some comments s2tag2=s2value2 [Section3] s3tag1=s3value1 you can do your

PHP parse_ini_file() performance?

陌路散爱 提交于 2019-11-28 18:49:39
I know some people store settings in an .ini file and get the values with parse_ini_file() in PHP. Without running tests, I am curious about performance. Do you know if opcode cache can cache any of this type of stuff if setting are in an ini file? Crozin According to this old blog post retrieved from web archives. From fastest to slowest: Serialized arrays Plain PHP code INI files XML files YAML files EDIT (08/02/2012) If APC or other accelerator is available on the server plain PHP files would be the fastest due to fact that they will be parsed only once and kept in memory for further use.

Reading and writing an INI file

送分小仙女□ 提交于 2019-11-28 10:08:32
问题 I have been toying with the below script to be able to read settings for use with my HTA (creating a game launcher). Here is my current HTA: http://pastebin.com/skTgqs5X It doesn't quite work, it complains of the WScript object being required. While I understand Echo will not work like that in a HTA I am having trouble modifying the code so it will work. Even just removing all Echo references it still has an issue with objOrgIni on line 200 of the below code (with the WScript references