עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

עזרה ב PHP בקריאת קובץ INI

Featured Replies

פורסם

אני צריך עזרה ב PHP לקרוא מקובץ INI רק מה שנמצא בסוגריים המרובעיים

דוגמא



Ini file
[option1]
aa=true
bb=false

[option2]
aa=true
bb=false

[option3]
aa=true
bb=false

הקוד צריך להדפיס

option1

otion2

option3

תודה מראש לעוזרים

פורסם

יש פורום ספציפי שנועד לבניית אתרי אינטרנט והשפות בתחום הזה. יש לפרסם הודעות כאלו שם, ולא בפורום תכנות כללי.

הועבר.

פורסם
<?php
$ini = parse_ini_file('file.ini',true);
print_r(array_keys($ini));
?>

פורסם
  • מחבר


<?php
$arr = parse_ini_file("access.ini" , true);
$all = array_keys($arr);
for($c = 0; $all["$c"]; $c++) {
$temp = $all["$c"];
echo "$temp<br>";
}
?>

עובד מצויין, תודה !

פורסם

^^^

רק הערה קטנה לגבי הקוד שלך: לאיטרציה על מערכים השתמש בforeach

פורסם
  • מחבר

<?php
$arr = parse_ini_file("access.ini.php" , true);
$all = array_keys($arr);
foreach ($all as $temp) {
echo "$temp<br>";
}
?>

שוב תודה :)

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.