phpDesigner 2008 help
Posted by: kennethjaysone (121.120.145.---)
Date: October 21, 2008 02:10PM

Hi php gurus,

I've just started learning php. I've installed WAMP on my laptop (Windows Vista).

I hoping if someone could help me with using phpDesigner 2008.

I've used Dreamweaver and when i want to open a new php document to write some scripts, Dreamweaver opens a new php document with the following code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[www.w3.org];
<html xmlns="[www.w3.org];
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>


But on phpDesigner 2008, when i open a new php document, this is the code i get.

<?php

/**
* @author
* @copyright 2008
*/



?>

Now is this how its supposed to be?

Another thing is, when i'm coding with phpDesigner 2008. Its a little confusing on which option to use when you want to test what you've coded. For example:

In Dreamweaver, to Preview or Debug in a browser all you have to do is click on the Preview/Debug in a browser button that automatically tests your on the default browser you've set.

In phpDesigner 2008, you have PHP : Run, HTML : Preview and Localhost.

Which one do you choose? Its a little confusing as i notice that phpDesigner 2008 creates a totally different file on the browser when you click on PHP : Run or HTML : Preview or Localhost. Why is that?


Thank you so much for reading this.

SIncerely,
Kenneth Jaysone Francis

Options: ReplyQuote
Re: phpDesigner 2008 help
Posted by: yfastud (Moderator)
Date: October 21, 2008 03:21PM

on dreamweaver, default page is xhtml while default on phpDesigner is php which you have to run through wamp so apache can parse php codes while xhtml/html can preview w/o any webserver ;-)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: phpDesigner 2008 help
Posted by: kennethjaysone (121.120.194.---)
Date: October 22, 2008 01:55AM

Thank you yfastud.

I need some help here. Please walk me through this. I've purchased some php books from Wrox to help speed up my learning. Now all the exercises and the sample code comes with the skeleton xhtml syntax with it. Now when i practice coding using phpDesigner 2008, how do i approach it when i create a new file?

1) Do i create a HTML and then insert the <?php...?> code within the HTML.

Or,

2) Do i create a new PHP file and then insert the doctypes and all the needed xhtml markup to form the skeleton for the document?

And when it comes to testing my work (i'm developing on a local machine - WAMP), do i
click on PHP : Run or HTML : Preview or Localhost to test what i've done?

Thank you so much.

Sincerely,
Kenneth Jaysone Francis

Options: ReplyQuote
Re: phpDesigner 2008 help
Posted by: yfastud (Moderator)
Date: October 22, 2008 02:31AM

most server script language can be embeded in html; for php script, you can either save the file w/ php or html extension; however, if you decide to save as html, you need to setup your server to parse php that save as html; for example, these sample will work the same

<!-- File test.html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[www.w3.org]; 
<html xmlns="[www.w3.org]; 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Untitled Document</title> 
</head> 
<body>

<?php 
echo "test php script";
?>
 
</body> 
</html>

// File test.php
<?php 
echo "test php script";
?>


To access your site w/ wamp, check my guide here

[guides.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: phpDesigner 2008 help
Posted by: skoobiedu (---.austin.res.rr.com)
Date: October 22, 2008 02:45AM

K, I'll try and answer your questions.

1) Default PHP file contents.
a. Open up phpDesigner 2008.
b. Goto Tools > Preferences... > Editor > Templates
c. In the text box to the right, replace the text that's there with the following:
<?php
/**
* @author [$username]
* @copyright [$year]
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[www.w3.org];
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<?php
[$cursor]
?>
</body>
</html>

Modify to your liking, as this will be what you see every time you create a new PHP file. The '[$cursor]' tag is where the edit cursor (aka. the caret) will be placed, to make editing quicker. Those square tags won't be in the actual document when you create, instead they'll be replaced with the appropriate text. Here's some examples:

[$username] = your Windows user name
[$email] = the email you registered phpDesigner with, i think
[$company] = the company you registered phpDesigner with, i think
[$year] = the current year
[$month] = the current month
[$day] = the current day
[$time] = the current time
[$project] = the project the file is being added to
[$filename] = the file name of the new file, might include the path

2) I'm not sure about that, since i usually just open a browser window, and navigate to the script i'm testing.
a. Open the browser of your choice.
b. In the address bar, type the following:
[localhost];

The PHP scripts must be located in a directory that the Apache server has access to (eg. <wamp_directory>/www/).

I personally don't like phpDesigner for a couple of reasons: a) it isn't free, it's trialware; b) the syntax highlighter isn't very good, it leaves parts of the file discolored; c) it's not laid out efficiently.

I like Adobe Dreamweaver and ActiveState Komodo IDE/Edit. Dreamweaver isn't free either, but it's better than phpDesigner. Komodo IDE isn't free either, but Komodo Edit is, and Komodo Edit is just a lighter version of Komodo IDE. It has everything Komodo IDE offers, just not the more advanced features, that could be considered 'enterprise' tools.

Hope this was of some help.

Timeless Thoughts of Imagination
-----------------------------------------------------
I am pessimistically optimistic.

Options: ReplyQuote


Sorry, only registered users may post in this forum.