PDA

View Full Version : اتصال به mysql با dream weaver



nejat_mohammadhossein
دوشنبه 03 تیر 1387, 20:48 عصر
سلام
اتصال به mysql در محیط dream weaver چجوریه؟ من از wamp5 استفاده میکنم.

yaqubian
دوشنبه 03 تیر 1387, 22:52 عصر
دوست عزیز منوالش رو واستون می فرستم امیدوارم بدردتون بخوره

To connect to a database when developing a PHP application in Dreamweaver, you must have one or more MySQL databases and the MySQL server must be started.

Open a PHP page in Dreamweaver, and then open the Databases panel (Window > Databases).
Click the Plus (+) button on the panel, select MySQL Connection from the menu, and complete the dialog box.
Enter a name for the new connection, without spaces or special characters.

In the MySQL Server box, enter an IP address or a server name for the computer hosting MySQL. If MySQL is running on the same computer as PHP, you can enter localhost.

Enter your MySQL user name and password.

In the Database box, enter the name of the database, or click Select and select the database from the list of MySQL databases, and click Test.

Dreamweaver attempts to connect to the database. If the connection fails, double-check the server name, user name, and password. If the connection still fails, check the settings for the testing folder Dreamweaver uses to process dynamic pages.

Dreamweaver makes a best guess at auto-populating the value for the URL prefix in the Testing Server category of the Site Definition dialog box, but sometimes you will have to adjust the URL prefix to get your connection to work. Make sure that the URL prefix is the URL that users type in their browsers to open the web application, minus the file name (or start page) of the application.

Click OK.

nejat_mohammadhossein
سه شنبه 04 تیر 1387, 15:33 عصر
راستش من اون قسمت help از dreamweaver رو خونده بودم ولی مشکل من موقع دادن username , password هست چون من با localhost و بدون password به database وصل میشم.چجوری یه username و password برای mysql تعریف کنم؟
تازشم چرا تو قسمت design از dreamweaver نمیشه خروجی کدهای php رو دید؟

yaqubian
سه شنبه 04 تیر 1387, 16:00 عصر
دوست عزیز
1- فکر می کنم واسه زمانی که دارین بصورت localhost کار می کنین نیازی به username و pass ندارین. هر زمان خواستین سایتتون رو upload کنین می تونین این تنظیمات رو روی سرور انجام بدین(موقع ساختن DB و تنظیمات اون روی سرور).
2- در مورد قسمت design هم باید بگم چون php سرورساید هست باید کدها اجرا بشن و بعد شما خروجی رو ببینین. واسه همین اول شما صفحه رو باید روی یه سرور واقعی یا virtual اجرا کنین تا کدها اجرا بشن و شما بعدش بتونین خروجی html کدها در سمت خودتون ببینین. یعنی نتیجتا باید بگم این امکان وجود نداره که شما بتونین خروجی php رو در قسمت design نرم افزار ببینین.
موفق باشید