עבור לתוכן
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.

התחברות לMYSQL

Featured Replies

פורסם

שלום לכולם

התקנתי במחשב שלי את APACHE ושרת MYSQL בשביל לעבוד על פיתוח האתר שלי.

וכדי להתחבר לmysql אני משתמש שה- host שווה ל-localhost והמשתמש הוא root

אבל בשרת אחסון הנתונים שונים אז מה שניסיתי לעשות זה פתחתי קובץ בשם constant.php ובו כתבתי

<?PHP

define("MYSQL_HOST", "localhost");
define("MYSQL_USER", "root");
define("MYSQL_PASS", "pepper123");
define("MYSQL_DB", "dbdb");
?>

ואז פתחתי קובץ index.php שבו כתוב-


<?php

# call constants.php for database connection details
require'constants.php';


//Make a MySQL Connection
mysql_connect("MYSQL_HOST", "MYSQL_USER", "MYSQL_PASS") or die(mysql_error());
mysql_select_db("MYSQL_DB") or die(mysql_error());
?>

(זה לא כל הקוד) וזה לא עובד לי

מודיע לי שאין כזה שרת בשם MYSQL_HOST ולא מריץ כלום

מישהו יכול לעזור?

פורסם

mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS

פורסם

בשביל להשתמש במה שהגדרת ב-define תשתמש בלי "

(רק רציתי להסביר את זה שמעליי)

ארכיון

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

דיונים חדשים

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.