PHP Code Assist?
Hello,
I am trying dreamweaver out as an alternative as i find most programs are not very helpful.
I am new to PHP and thought Dreamweaver CS4 will help me with my learning of PHP programming.
Does anyone know of a PHP Code Assist addon ?
I find dreamweaver CS4 does not hardly provide any help with assisting when i am programming. To have some help would be great.
The help it provides is very minimal.
So if you know of any addon, extension i would appreciate a reply.
Thank you,
genieuk
genieuk wrote:
for example i was using Aptana Studio and as i typed it would automatically come up with suggestions of what i was going to type so when i press enter it does it for me.
I haven't used Aptana, but I have used other PHP editors, such as Zend Studio and PhpED. Dreamweaver doesn't track the names of variables used in a page, so it can't make intellisense-type suggestions. It would certainly be a good addition to Dreamweaver, but it doesn't do it.
What Dreamweaver does have is code hinting for approximately 2,600 PHP functions. Anywhere in a PHP block, just press Ctrl+Space, and the code hints appear. As you start typing, the code hints scroll, and you can press Enter as soon as you hit the function you're looking for. It then inserts the opening parenthesis and displays hints for the arguments.
Dreamweaver also has a suite of PHP server behaviors that speed up development with a database connection. However, if you're already hand-coding, you might find them limiting. The server behaviors are a good start, but the code needs customizing if you want to go beyond basic functionality.
Similar Messages
-
Php code is not working as intended in a simple spam block solution
Hi. I'm trying to get some simple php code (as suggested on a tutorial page I found) to work on my form submission test page in order to reduce/stop spam. However, the results so far have not quite been what I expected. Any help will be appreciated.
Basically I used the code given in the two grey boxes on this tutorial page http://myphpform.com/form-spam.php (but had to add this <?php ... ?> around the code given in the second box, otherwise it wouldn't have worked!) for my test page, and the result was supposed to look something like shown on this page http://myphpform.com/contact.php and indeed when I previewed my page in offline mode it displayed as intended with the extra field similar to the "Access code:" as on this example page, however that's not what I got when I uploaded my page.
What happens when I go to the live page is that as soon as it loads it gives me the message: "Wrong access code" before I even have a chance to look at the form there. It's the message the user is supposed to get when they input the suggested code incorrectly, but not when the page first loads! This is what the live test page basically looks like when I go to it http://www.scotiauk.com/contact/forms/smotsContactTest.php. I wonder what's going wrong?
I actually noticed a short while ago, after 'viewing page source' (source code) on the live test page that the page is for some reason only displaying less than half of the html code and cuts off the rest of it (including all of the <body>) just at the point (at the end of the <head> section) where the couple of lines of php script (borrowed from the second grey box in the tutorial) were meant to be - the script that includes "Wrong access code". So I get why it shows a blank page with only that message in it but not why it removes all of the <body> code once it is live!
Just for information, this is what the page is really meant to look like - minus the php code: http://www.scotiauk.com/contact/forms/smotsContact.html. That is the original page that I copied and tried to modify with the new code. So, any ideas will be appreciated, thanks!Just for information, this is what the page is really meant to look like - minus the php code: http://www.scotiauk.com/contact/forms/smotsContact.html. That is the original page that I copied and tried to modify with the new code. So, any ideas will be appreciated, thanks!
The page that you have quoted contains an infection as the following warns.
As far as your problem is concerned, you need to know how a from works. Have a look at this video. -
Hello-
First if this has been answered already I'm sorry as I have not yet located this answer to these questions (or they are half answered)
1) Can I build a PDF form that on submit it will upload to a server (the entire pdf file) using PHP code? If so please tell me the best way to accomplish this as I want any user to fill out the pdf and then submit to a specific location of a folder on my site.
2) I know that Adobe Reader v. 6 will not allow people to submit electronically - but am I correct that version 7 to the lastest will allow them to submit the form (via email or FTP if possible)? I keep finding yes/no. I am aware of Adobe Reader Usage Rights that has to be assigned.
Thanks in Advance
-BritThe answer to question 1 is yes, assuming the form is Reader Extended by a LiveCycle Reader Extensions Server (the Extended Usage Rights in Acrobat are not sufficient).
The answer to 2 is yes and no. By e-mail, as long as the user has a client configured through MAPI (such as Outlook on Windows) you can automate the attaching to an e-mail (but not sending - the user still needs to click send). If the user uses a web client like GMail, then no, that can't be automated. And Acrobat does not have built-in FTP functionality. -
Firefox 3 displays the php code when pages launched from dreamweaver 8
The problem seems to relate to files opening as —
file:///C:/localweb/ .... when sent from Dreamweaver 8.0 to Firefox
The first html/php page loads correctly from dreamweaver as
processed HTML, a second page linked from either an HTML or php
page also loads correctly, but selecting any link from that or
subsequent pages displays the full php code instead of processed
html layout - so this appears to be a third level or greater
problem.
If I manually substitute -
http://localhost/ — the problem
does not arise.
This is a problem with version 3 of firefox, all previous
versions I used worked fine with both — file:///C:/localweb/
and
http://localhost/
Both prefixes also appear with pure HTML sites, but they load
and function correctly.
Not every php site I have loads with file:///C:/localweb/, so
I am wondering if this relates to something in the php code or
Dreamweaver - I have conn.php set to:
mysql_connect("localhost", "root", "") or die(mysql_error());
I use winxp and have xampp installed - everything worked fine
until I installed Firefox 3> but selecting any link from that or subsequent pages
You are being confused by a) not understanding root relative
vs document
relative links, and b) not understanding how DW previews
files.
If I have a document with a link to an image that looks like
this -
<img src="/images/foo.gif"...
That's what's called a root relative link.
If I preview that document in DW, then the browser gets the
document, sees
the leading "/" and reads that as the root of the hard drive,
since the
browser has no idea where the root of the site is. Thus, the
image is
broken in the preview.
If I have temp files enabled, then DW will secretly convert
the file being
previewed into a temporary file, and hand that to the
browser. This temp
file has had all root relative links converted to document
relative links
(as you will see by looking at the code in the browser), and
has had all
include files actually embedded in the page, and has had all
external CSS
and js markup embedded in the page. In other words, DW has
made the
document into a stand-alone page.
If you do not have temp files enabled, all of these links
would be broken on
preview.
Now - if you are using root relative links, AND you have temp
files enabled,
AND you click away from the previewed document, then all of
your links will
be broken, since DW has not made that linked file into a temp
file. This is
what you are seeing.
So - if you want to click away on preview, then you must use
document
relative links for the site -
<img src="../images/foo.gif"... (for example)
These will still work on preview since the browser knows how
to determine
the current file's location and how to follow that path.
Make sense?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"gbiras" <[email protected]> wrote in
message
news:[email protected]...
> The problem seems to relate to files opening as ?
file:///C:/localweb/
> ....
> when sent from Dreamweaver 8.0 to Firefox
>
> The first html/php page loads correctly from dreamweaver
as processed
> HTML, a
> second page linked from either an HTML or php page also
loads correctly,
> but
> selecting any link from that or subsequent pages
displays the full php
> code
> instead of processed html layout - so this appears to be
a third level or
> greater problem.
>
> If I manually substitute -
http://localhost/ ? the problem does
not arise.
>
> This is a problem with version 3 of firefox, all
previous versions I used
> worked fine with both ? file:///C:/localweb/ and
http://localhost/
>
> Both prefixes also appear with pure HTML sites, but they
load and function
> correctly.
>
> Not every php site I have loads with
file:///C:/localweb/, so I am
> wondering
> if this relates to something in the php code or
Dreamweaver - I have
> conn.php
> set to:
>
> mysql_connect("localhost", "root", "") or
die(mysql_error());
>
> I use winxp and have xampp installed - everything worked
fine until I
> installed Firefox 3
> -
A difficult problem with php code and sql code
it's good place to visit(Paged Result Sets with PHP and Oracle)
http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_paged.html
maybe below part php code could not be used in above address's php code.
if((isset($l_company) and $l_company != $rows['COMPANY']) or empty($stmt) and empty($total_pages) ) {
echo "<tr bgcolor='#CCFFCC'>";
echo "<td colspan= 3 align='center'>".$l_company."</td>";
echo "<td >".$totalcomany." </td>";
$totalcomany = 0;
echo "<td > </td>";
echo "</tr>";
$l_company = $rows['COMPANY'];
because the same company in one page could calculate sum while if
the same company in two pages could not do that.
and what do you think of ?
thanks !Hi,
this is because your sql-statement selects only the rows, you need to build this one page.
Neither php nor the given result from your query knows about data wich will be part of the result of another page.
Greetings from Hamburg
Thorsten Körner -
I need php code for copy paste our all histroy of browser in a text page.
I need php code for copy paste our all histroy of browser in a text page can any one send me the code please.
You can use an application like GarageSale for doing this....
http://www.macupdate.com/info.php/id/16035/garagesale -
Having trouble with my PHP code. Appers to get stuck on a white page.
HI all,
I have just began having trouble with my PHP code. Was working before and haven't made any changes to the code since last time it worked.
What happens is after the form is submitted it goes to a white page (no text just all white page) and in the address bar it has the path for my php page. what supposed to happen is either it goes to a success page or a error page.
I've had a problem where the info entered is correct but was directed to the error page. i managed to fix that issue but i am puzzled what is happening to my php page now.
Mind you that i didn't write this code i just took over the responsiblities of this website and i am hopping that its a quick fix.
I appreciate any help you could give me. Thank you.
CODE:
<?php
$to = '[email protected]';
$from = '[email protected]';
//Make sure we have some info posted from the form...
if (isset($HTTP_POST_VARS)){
//Clear the body of the message to be sent
$body = '';
//go through all POSTed variables sent
while (list($key, $value) = each($HTTP_POST_VARS)){
if($key <> "Submit" && $key <> "submit") {
$body .= $key . ' = ' . $value . "\r\n";
//Now building mail headers.....
$headers = "From: ".$from."\r\n";
//Mail message
$success = mail($to, "Email Club" . date("m/d/Y"), $body, $headers);
// CURL stuff.....
$ch = curl_init();
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4); //times out after 4s
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
if ($success){
//readfile('http://www.lvpaiutegolf.com/thankyou.html');
curl_setopt($ch, CURLOPT_URL,"http://www.lvpaiutegolf.com/thankyou.html");
header("Location:http://www.lvpaiutegolf.com/thankyou.html");
else{
// readfile('http://www.lvpaiutegolf.com/error.html');
curl_setopt($ch, CURLOPT_URL,"http://www.lvpaiutegolf.com/error.html");
header("Location:http://www.lvpaiutegolf.com/error.html");
// Output
//$result=curl_exec ($ch);
//curl_close ($ch);
//echo $result'";
?>Insert the install disk and boot from it. Use disk utitlity to repair your drive and check for errors (report any errors back here) then reinstall the os. This should not erase your data.
-
Use PHP code coloring in HTML files
In Dreamweaver CS3, what changes do I need to make to get PHP
code coloring show up in .html files?robot88888888,
First, copy this file from the app config folder:
C:\Program Files\Adobe\Adobe Dreamweaver
CS3\configuration\CodeColoring\PHP.xml
To the user config folder:
C:\Documents and Settings\[username]\Application
Data\Adobe\Dreamweaver
9\Configuration\CodeColoring\
Then open PHP.xml in your favorite editor. You need to add
HTML to all
of the doctype lists Change every occurrence of this:
doctypes="PHP_MySQL"
to be:
doctypes="PHP_MySQL,HTML"
Save and close. If DW is running, close it. Now restart DW.
HTH,
Randy
> In Dreamweaver CS3, what changes do I need to make to
get PHP code coloring show up in .html files? -
How to write this sql query in php code ?
for example:
insert into temp
select *
from testtable;
after this, i will query data from sql below:
select *
from temp;
how to write this php code ?
who can help me ?
thanks!Have a look at the manual to find out how to issue queries.
http://us3.php.net/oci8 -
I need help please, altering the PHP code generated when exporting my Muse websites (to a host other than Business Catalyst). The emails generated from the forms need to have the sender's name in the subject line of the emails.
This would require editing the published php page outside of Muse and would require the knowledge of PHP. You may get the required info at http://www.php.net or some PHP specific forums.
Thanks,
Vikas -
JDeveloper issues (code assist and navigation)
JDeveloper Team,
I noticed the following issues with JDeveloper
a) Code assist is not available for "var" attribute in JSP/JSF editor. For example, in <h:dataTable value="#{customer.customersFindAll}" var="current">, no code assist is available for "current" variable.
b) "Select in Navigator" option in the code editor window, does not navigate to the target file if the target file belongs to a different workspace. It does change the workspace in the navigator but I have to execute "Select in Navigator" again to navigate to the target file.
Hope this gets resolved in the next release.
Thank you,
Bala Raman.Thanks for posting these issues. I will file bugs to track these.
--srini -
Fluid grid for Wordpress: insert PHP code into DW or DW code into Wordpress?
This may be a stupid question but it's a dilemma for me. Here's the problem. I want to create a mobile first, fluid grid Wordpress website in Dreamweaver CS6 based on an existing Wordpress theme. I can see two ways of doing that:
1) Create a fluid grid layout in DW, then insert the Wordpress PHP code into the right places in DW
Pro: the fluid grid layout is set up by DW and therefore can be easily edited with DW (I imagine)
Con: It is beyond my coding skills to make a fully functional WP template
2) Take an existing responsive Wordpress template with media queries and edit that in Dreamweaver
Pro: I start with a fully functional WP template and only have to make changes (mostly in CSS) to customise it
Con: When I start with an existing template (like Skeleton) I run into trouble using DW
For example: I click a navigation button to get at the CSS but it's not clear to me from DW's interface in which media query I have to make changes. I did a tutorial on creating a fluid grid layout with DW so I can do that. But DW doesn't work the same way with an existing WP template like Skeleton. I searched the web but all I can find is help on creating a fluid layout with DW, not editing an existing one.
By the way, I am experienced with HTML/CSS but not PHP and I have a local Wordpress server running on my Mac so I can work in Dreamweaver's Live View.
The problem may be that I am only just starting with responsive web design and need some more experience with media queries, css rules and DW CS6. Could anyone comment on this problem or point me towards more information on the subject?
TIA!You can certainly use DW to customize a 3rd party WP Theme. However, you must be throughly familliar with how WordPress Themes work and have a good working knowledge of HTML, CSS and PHP code. Design View will not be much help to you.
WP Themes are a sum of their various parts: header.php, footer,php, sidebar.php, page.php, index.php, archive.php, etc... The web server parses code from the various parts and creates whole pages on the fly. Once WP is deployed on your server, you cannot use DW to edit content. You must use the WP Admin Panel (CMS) to manage content, Themes, plugins and backup data.
For simple static sites, the FluidGrid Layout feature in DW is a nice starting point. But these layouts have definite limitations which, IMO would not be a good fit with WordPress.
Nancy O. -
How to write good PHP code in dreamweaver?
Here's the thing. I'm using Dreamweaver CS4 to develop a website. In the past my php files would look like this:
<?php
echo '<h1>Welcome ' . $name . '</h1>';
?>
This caused problems in the design view because all I would see would be the php icon to let me know I have some script in this location and that is it.
Then I started to realize that I should write my code like this:
<h1>Welcome <?php echo $name; ?></h1>
This second way of writing php code is a lot easier to work with in Dreamweaver since in the design view I can see the formatted h1 tag with the word 'Welcome' beside it (followed by the php icon). I can still apply all the standard CSS rules inside Dreamweaver and the design view updates nicely.
So now here is my issue.What is the best way to handle if statements? Say I want to toggle between <h1>Welcome $user</h1> and <h2>Good bye</h2> BUT I would like to still be able to format the CSS and see the results on the screen in design view. Is it possible?
If I do the following, then I'm back to square one. I can't see my CSS rules applied in the design view since all I have is the PHP icon to show where the script is located:
<?php
if( $welcome ) {
echo '<h1>Welcome ' . $name . '</h1>';
else {
echo '<h2>Good bye</h2>';
?>There is another way. But it's considered advanced PHP in this community. It's called a a ternary operator. So
<?php
if( $welcome ) {
echo '<h1>Welcome ' . $name . '</h1>';
else {
echo '<h2>Good bye</h2>';
?>
woud look like:
<?php echo($welcome?'<h1>Welcome '. $name . '</h1>' : '<h2>Good bye</h2>'); ?>
Here's a link to a good explanation: http://www.addedbytes.com/code/ternary-conditionals/ -
for example:
create table testtable (
sales_area varchar2(30),
sales_comp varchar2(40),
sales_market varchar2(30),
order_number number(20),
order_date varchar2(20),
item_id number(15),
quantity number(20),
item_desc varchar2(50)
insert into testtable values ('westarea','acompany','amarket','52001',1001,1,10,'apple');
insert into testtable values ('westarea','acompany','amarket','52005',1002,2,20,'banana');
insert into testtable values ('eastarea','bcompany','bmarket','52002',1003,2,50,'banana');
insert into testtable values ('eastarea','bcompany','bmarket','52004',1006,1,30,'apple');
insert into testtable values ('eastarea','bcompany','bmarket','52003',1007,1,30,'apple');
insert into testtable values ('westarea','ccompany','cmarket','52006',1003,1,30,'orange');
insert into testtable values ('westarea','ccompany','dmarket','52007',1004,3,60,'orange');
commit;
select *
from testtable
it outputs below:
westarea acompany amarket 52001 1001 1 10 apple
westarea acompany amarket 52005 1002 2 20 banana
eastarea bcompany bmarket 52002 1003 2 50 banana
eastarea bcompany bmarket 52004 1006 1 30 apple
eastarea bcompany bmarket 52003 1007 1 30 apple
westarea ccompany cmarket 52006 1003 1 30 orange
westarea ccompany dmarket 52007 1004 3 60 orange
use php code outputs like below php code :
apple banana orange .......
westarea acompany amarket 52001 1001 10
westarea acompany amarket 52005 1002 20 ........
acompany 10 20 .........
westarea ccompany cmarket 52006 1003 30 .........
westarea ccompany dmarket 52007 1004 60 .........
ccompany 90 .........
westarea 10 20 90 .........
eastarea bcompany bmarket 52002 1003 50 .........
eastarea bcompany bmarket 52004 1006 30 .........
eastarea bcompany bmarket 52003 1007 30 .........
bcompany 60 50 .........
eastarea
total 70 70 90 ......
make below php code output a new table:
<?php
$v_item_count = count(array(item));
echo"<table border = 1>";
echo "<tr>";
echo "<td rowspan="2">sales area</td>";
echo "<td rowspan="2">sales comp</td>";
echo "<td rowspan="2">sales market</td>";
echo "<td rowspan="2">customer_number</td>";
echo "<td rowspan="2">order_number</td>";
echo "<td colspan="'||to_char($v_item_count)||'">categories and quantities</td>";
while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
echo "<tr>";
echo "<td>".$row['ORDER_NUMBER']."</td>";
?>
who can help me?for example:
while ($row = oci_fetch_array ($stmt, OCI_BOTH)) {
echo "<tr>";
echo "<td>".$row['ORDER_NUMBER']."</td>";
echo "<td>".$row['ORDERED_DATE']."</td>";
for ($i=0; $i<sizeof($items); $i++) {
echo "<td>".$row[$i]." </td>";
echo "</tr>";
echo "</table>";
?>
above php code should output plentites of lines while it output few lines.
i don't know there has many lines outputed?
who can help me? -
Update sap table using a function module call by php code
Hello,
I m trying to update the table VBAP using a function module ZZ_SET_DISTANCE call by a php code.
But I have this problem:
the saprfc seems to work well but when I look to the table VBAP the fields have not been update.
I tried the function module in debug mode and it work good. The fields are update.
I also handle the saprfc call function and the return SAPRFC_OK
This are the function module ZZ_SET_DISTANCE, and the php code
//PHP CODE
$fce = saprfc_function_discover($sap,"ZZ_SET_DISTANCE");
if (! $fce ) {echo "Echec d'ouverture du module fonction "; exit;}
saprfc_import ($fce,"COMMANDE", '0000001998');
saprfc_table_init($fce,"TBLE_CMDE");
$val=array();
$val['NUM_POST']='000030';
$val['HN_EXP']='';
$val['ST_EXP']='';
$val['PC_EXP']='';
$val['CI_EXP']='';
$val['CO_EXP']='';
$val['HN_REC']='';
$val['ST_REC']='';
$val['PC_REC']='';
$val['CI_REC']='';
$val['CO_REC']='';
$val['DIST']='popo';
saprfc_table_append ($fce,"TBLE_CMDE", $val);
$rfc_rc = saprfc_call_and_receive ($fce);
echo "\n".$rfc_rc;
if ($rfc_rc != SAPRFC_OK) { if ($sap == SAPRFC_EXCEPTION ) echo ("Exception raised: ".saprfc_exception($fce)); else echo (saprfc_error($fce)); }else{echo '/execution de la function ;}
saprfc_function_free($fce);
//FUNCTION MODULE ZZ_SET_DISTANCE
FUNCTION ZZ_SET_DISTANCE.
""Local Interface:
*" IMPORTING
*" VALUE(COMMANDE) TYPE VBELN
*" TABLES
*" TBLE_CMDE STRUCTURE ZADD_COM_LOXAN
DATA : NUMC TYPE VBELN.
NUMC = COMMANDE .
WHILE STRLEN( NUMC ) < 10 .
CONCATENATE '0' NUMC INTO NUMC .
ENDWHILE .
DATA tble_addrcomm LIKE LINE OF TBLE_CMDE .
LOOP AT TBLE_CMDE INTO tble_addrcomm.
DATA : NUMP TYPE POSNR.
NUMP = tble_addrcomm-NUM_POST.
WHILE STRLEN( NUMP ) < 6 .
CONCATENATE '0' NUMP INTO NUMP .
ENDWHILE .
UPDATE VBAP SET ARKTX = tble_addrcomm-DIST
WHERE VBELN EQ COMMANDE
AND POSNR EQ NUMP.
ENDLOOP.
ENDFUNCTION.
Is anybody can help me?
thank.Marie, create a Blog please, about more details for dummies....
1) how to connect to sap system?
2) you run the php code where? in a webserver or where?
3) wich is the url for run the FM: ZZ_SET_DISTANCE
4) you placed some dlls files on the web server?
please is interesting this...
Thanks
Maybe you are looking for
-
Slow Render with High-End System?
Im currently working on a (in my opinion) high-end Windows system for video editing. The system is about 2 years old and has cost a fortune in that time. So Im expecting significantly better speed. So heres my problem: Im working primarly in Premiere
-
What is the best practice on mailbox database size in exchange 2013
Hi, does anybody have any links to good sites that gives some pros/cons when it comes to the mailbox database sizes in exchange 2013? I've tried to google it - but hasn't found any good answers. I would like to know if I really need more than 5 mail
-
DC pension not calculating at 10% of the Pensionable earnings.
Users, Part of the reason we made the changes to /171 was so that we could setup DC pension that would calculate automatically. We setup the WT 7310 effective September 1st, but the Pension is not calculating at 10% of the Pensionable earnings. It l
-
Quality of imported Bitmap (BMP or PNG)
I'm in trouble with the impage importation in Flash 5. I would like to import a BMP or PNG and mantain the "pixel" definition (I don't want blur effect around margin..) I tried in every way and settings but I can't do it!!!!!!! Is it possible? Is it
-
Power manager questions on Windows 7
I recently installed the 3.05 version of Power manager and have a few questions. First, I used to be able to left click on the green battery bar icon once to control switching between power plans, double click to bring up the power manager, and right