-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use the flow-php-server #3
Comments
+1 for example plz |
Basic usage example at readme.md is almost complete, just put it to php file: index.php:
We can also improve it by providing our config class and request class: index.php:
Now, we have access to flow.js request params, because we have created Our final index.php:
For more detailed explanation, please look inside the source: https://github.com/flowjs/flow-php-server/blob/master/src/Flow/Basic.php Flow.js configuration:
|
Thanks. |
Sorry, I can't teach you PHP, but I can give you some hints:
|
Hello, I have exactly the same issue Tombujok, I see only classes but nothing that's instantiated, how to load these classes? I tested: <code
Return : Fatal error: Class 'Config' not found in /var/www/wamteam/PHP/controler.php on line 32 |
No, it's not about teaching PHP - it's about usability. In the Java world we normally create a sample project that simply works - On Tue, Jun 24, 2014 at 4:47 PM, Aidas Klimas notifications@github.com
|
If you are using composer, then your index.php should start with:
Without composer:
Hope this helps |
Thanks works great after and load autoload.php in vendor. Thanks |
Alright! Got this working with Laravel. There were some problems but I recreated the basic class and it's looking good. |
Hello, I'm trying implementing this at YII Framework, but I have some problems because my application make a lot of GET and POST request to send chunks. I understand that, but my question is. why GET requests return a "404 not found"? or even how can I avoid the GET Requests to use just POST? |
I'm also having an issue with using this library: This is the first lines in my flow-php-server/src/index.php <?php
require_once( __DIR__ . '/../vendor/autoload.php'); but I'm getting this error:
should I use this at top of my index.php? namespace Flow; When I add the namespace, I get 404 and "Provisional headers are shown" errors in my browser network panel. What am I missing? |
I solved the problem I had by doing the next steps: 1.- include the files and using the following namespaces: require_once(dirname(FILE) . "/../extensions/vendors/Flow/Autoloader.php"); 2.- instantiate config and Request:
3.- call the Static function save in Basic passing the required parameters: FBasic::save($fileName, $config, $request); and finally in the JavaScript file I changed a property called testChunks which is normally "true" to "false", that's to avoid lots of GET requests!. I hope those steps work for you!. |
I solved my problem by copy pasting the source code of Node.js sample into my html file that I was using to select files to upload. I think I was making a mistake in my JavaScript. |
@jesusp thanks for the advice! it helped me to make flow.js work out on Yii. |
@batusa You're welcome it's always a great pleasure to contribute with comments!. I feel very well because that worked well for you!... |
my frontend seems to run well and pictures are uploaded, chrom console like below: catchAll but in fact flow listeners are not called, console.log nothing. The code like this: //flow event listener and nothing is happened in backend. I am sorry to ask the same question again, Is there a full example available how to use the flow-php-server from scratch? much appreciated. |
help:: |
Without any third-party php framework in my php server side, when using this library I also encountered the problem that Class 'Config' not found. I fixed it as following, may it would help. require_once (DIR.'/../lib/flow-php-server/src/Flow/Autoloader.php'); |
@jesusp having Thanks |
@viruskst Do you already have an solution for your extension problem? I'm having similar issues here as well. |
@aklassen do you have |
is it possible can i save at the time of submit form |
Hi,
Is there a small example available how to use the flow-php-server from scratch?
Thanks
Tom
The text was updated successfully, but these errors were encountered: