Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2004, 10:16 PM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default IDE and HTML

1.)Do you guys use an IDE to edit your PHP?
2.)If so, what do you use?
3.)What is the best free IDE for PHP?


4.)This is an HTML question, I want to save a file through a dialog box that picks the directory and stuff. Is that possible using the <input type="file" ...> tag?

 
Old January 17th, 2004, 04:59 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Personally I like to handcode all of my PHP.. I use Crimson Editor, which is available free from http://www.crimsoneditor.com.

That being said I think that Zend offers a PHP IDE.. which can be found at http://www.zend.com. I *think* they offer a shareware version for free.

Not sure on your last question, perhaps using JavaScript or VBScript...

: )
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old January 17th, 2004, 05:02 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Oh also, <input type="file" ...> won't work, this is for outgoing files.. won't work to prompt the user to save a file. That much I can say.

:D
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old January 17th, 2004, 09:44 PM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying! I just downloaded Crimson, I was using PHPEdit (it was OK but not great).

I want to make a save file feature. Basically I'm storing a XML file with the a blob field in Sybase database, I want to be able to save it to a file. I know how to write a file but I'd like to have a nice dialog to pick the directory and stuff. Anybody know how?

 
Old January 17th, 2004, 10:00 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Oh Ok, If you want to prompt the use to save a download..

<?php

// download.php
// MIME type, i.e. text/plain text/html application/msword image/pjpeg.. etc

header("Content-type: MIME TYPE HERE");
header("Content-Disposition: attachment; filename=proposed file name here");

echo $body; // File contents here

?>

This will present the user with a save as dialouge.

The Zend Studio IDE was actually pretty cool I went ahead and downloaded it. For some reason I thought it was more WYSIWYG-ish.. it does have some pretty cool features. One being a kickass debugger.

Some things I noticed that it picks up on:
Use of assignment in a conditional statement
If you create a variable but don't use it (perhaps as the result of a typo or logic error)
Unsafe use of Global variables.
.. plenty more I'm sure..

It has a window that contains every PHP function complete with argument lists and return values, and if you right click on the function there's a link to the online manual entry for that function.

They say the shareware version which is fully function for, I dunno, 22 days, then supposedly a few "advanced" features cease to fuction. Is it worth $200? Personally I would wait for a future version with more bells and whistles before paying that much for it. What can I say, I'm a tight wad! I don't think its as cool as crimson just yet. The extra debugging and whatnot is cool and all, but productivity wise it could be a little better. Like support other language syntax, the ability to undock parts of the application for multiple monitor usage.. and well Crimson is free!

Just my two cents!

:D'
Rich

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old January 18th, 2004, 02:07 PM
Authorized User
 
Join Date: Jan 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, that works great! But I'm trying to call a PHP function from with a JavaScript function, but I keep getting errors. Is it possible?

<script language="javascript">
function save_dialog()
{
    <?php save_file(); ?>
}
</script>

 
Old January 18th, 2004, 02:49 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Remember PHP is a server-side language and Javascript is a client-side language.. Its possible but not with the way you're thinking of it. You need to call on the server side process from JavaScript.

I would do something like the following..

<script language='javascript' type='text/javascript'>

window.open('download.php?args=args', 'download', 'width=200, height=200');

</script>

I think that because the download script creates a download that presents the user with a save as dialouge that the window will disappear once download begins.

: )
Rich


:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
 
Old January 18th, 2004, 02:50 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Oh sorry, and you can call on that with a JavaScript function of course...

:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual C++ IDE requiemxx Visual C++ 1 March 29th, 2007 05:12 AM
Java IDE The Beginner Java Basics 3 March 8th, 2007 07:47 PM
C++ IDE acuratk C++ Programming 3 December 4th, 2004 03:16 AM
About the IDE Question Loy Iceman VB.NET 2002/2003 Basics 1 July 19th, 2004 09:10 AM
VS IDE doesn't see Framework 1.1? Ron Howerton VS.NET 2002/2003 5 February 5th, 2004 01:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.