Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
How To Get String From Call To PHP Script? |
Thu, Nov 15 2018 3:32 AM | Permanent Link |
Frederick Chin | I have the following code in hello.php stored in the IIS directory. IIS is listening at port 8084.
<html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html> With a browser, I type localhost:8084/hello.php and I get "Hello World". In EWB, I use a TServerRequest and set the URL to "http://localhost:8084/hello.php" and in the OnComplete event of the TServerRequest, I have the following code:- showmessage(Request.ResponseContent.Text); When I execute the TServerRequest, I get a blank string. What am I doing wrong here? -- Frederick |
Thu, Nov 15 2018 6:42 AM | Permanent Link |
D.C. | Hi Frederick,
Try with this: <?php print 'Hello World'; ?> Let out all the html code and use only php. I don't remeber if the use of print instead of echo is mandatory but in all my php legacy code print is the way to send the output. Regards Diego Frederick Chin wrote: I have the following code in hello.php stored in the IIS directory. IIS is listening at port 8084. <html> <head> <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html> With a browser, I type localhost:8084/hello.php and I get "Hello World". In EWB, I use a TServerRequest and set the URL to "http://localhost:8084/hello.php" and in the OnComplete event of the TServerRequest, I have the following code:- showmessage(Request.ResponseContent.Text); When I execute the TServerRequest, I get a blank string. What am I doing wrong here? -- Frederick |
Thu, Nov 15 2018 11:11 AM | Permanent Link |
Frederick Chin | Hi D.C.,
/* Try with this: <?php print 'Hello World'; ?> Let out all the html code and use only php. I don't remeber if the use of print instead of echo is mandatory but in all my php legacy code print is the way to send the output. */ It seems that whether I use "echo" or "print", the string is not returned. However, I managed to solve the problem as follows:- 1. Enabled CORS in IIS (Not sure if that solved the problem) 2. Copied the EWB app to IIS's c:\inetpub\wwwroot directory (The hello.php file is in IIS's directory) 3. Changed the content folder for EWB server to IIS's c:\inetpub\wwwroot directory Now, when I call the EWB app from the web browser, "Hello World" is shown! I wish that EWB server supported PHP as an add-on. -- Frederick |
This web page was last updated on Sunday, December 1, 2024 at 03:59 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |