Bypasses the MVC bootstrapping

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Bypasses the MVC bootstrapping

expertics
How to use a standalone php file in the public folder that bypasses the
MVC bootstrapping, because I want to use  Zend\ProgressBar adapter for
upload files.

Thanks in advance!

George

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Bypasses the MVC bootstrapping

edipoReboucas

You have to modify the rewrite rules of you server.

If you are using apache, probably the rewrite are on .htaccess of your public folder.

Em 22/03/2015 12:22, "expertics [via Zend Framework Community]" <[hidden email]> escreveu:
How to use a standalone php file in the public folder that bypasses the
MVC bootstrapping, because I want to use  Zend\ProgressBar adapter for
upload files.

Thanks in advance!

George

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]





If you reply to this email, your message will be added to the discussion below:
http://zend-framework-community.634137.n4.nabble.com/Bypasses-the-MVC-bootstrapping-tp4662494.html
To start a new topic under Zend Framework, email [hidden email]
To unsubscribe from Zend Framework, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Bypasses the MVC bootstrapping

expertics
Hi, I am using nginx, but your answer helps me a lot.

Thanks


El 22/03/15 a las 10:18, edipoReboucas escribió:

> You have to modify the rewrite rules of you server.
>
> If you are using apache, probably the rewrite are on .htaccess of your
> public folder.
> Em 22/03/2015 12:22, "expertics [via Zend Framework Community]" <
> [hidden email]> escreveu:
>
>> How to use a standalone php file in the public folder that bypasses the
>> MVC bootstrapping, because I want to use  Zend\ProgressBar adapter for
>> upload files.
>>
>> Thanks in advance!
>>
>> George
>>
>> --
>> List: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4662494&i=0>
>> Info: http://framework.zend.com/archives
>> Unsubscribe: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4662494&i=1>
>>
>>
>>
>>
>> ------------------------------
>>   If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://zend-framework-community.634137.n4.nabble.com/Bypasses-the-MVC-bootstrapping-tp4662494.html
>>   To start a new topic under Zend Framework, email
>> [hidden email]
>> To unsubscribe from Zend Framework, click here
>> <
>> .
>> NAML
>> <
http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Bypasses-the-MVC-bootstrapping-tp4662494p4662495.html
> Sent from the Zend Framework mailing list archive at Nabble.com.


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Bypasses the MVC bootstrapping

Bas Kamer
In reply to this post by edipoReboucas
You do not need to edit the rewrite rules. The rewrite rules only redirects traffic to the index.php if a request does not have a corresponding real file.

It is thus possible to bypass zf bootstrapping simply by creating a file.

For example:

Info.php with phpinfo(); inside.



> Op 22 mrt. 2015 om 16:18 heeft edipoReboucas <[hidden email]> het volgende geschreven:
>
> You have to modify the rewrite rules of you server.
>
> If you are using apache, probably the rewrite are on .htaccess of your
> public folder.
> Em 22/03/2015 12:22, "expertics [via Zend Framework Community]" <
> [hidden email]> escreveu:
>
>> How to use a standalone php file in the public folder that bypasses the
>> MVC bootstrapping, because I want to use  Zend\ProgressBar adapter for
>> upload files.
>>
>> Thanks in advance!
>>
>> George
>>
>> --
>> List: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4662494&i=0>
>> Info: http://framework.zend.com/archives
>> Unsubscribe: [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=4662494&i=1>
>>
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://zend-framework-community.634137.n4.nabble.com/Bypasses-the-MVC-bootstrapping-tp4662494.html
>> To start a new topic under Zend Framework, email
>> [hidden email]
>> To unsubscribe from Zend Framework, click here
>> <
>> .
>> NAML
>> <
http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Bypasses-the-MVC-bootstrapping-tp4662494p4662495.html
> Sent from the Zend Framework mailing list archive at Nabble.com.

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Bypasses the MVC bootstrapping

Ralf Eggert
In reply to this post by expertics
Hi George,

> How to use a standalone php file in the public folder that bypasses the
> MVC bootstrapping, because I want to use  Zend\ProgressBar adapter for
> upload files.

The simplest setup could look like this. The file needs to be placed in
the public folder and the framework should be installed via Composer:

-----------------------------------------------------------------------
<?php
use Zend\ProgressBar\Adapter\JsPull;
use Zend\ProgressBar\ProgressBar;

require_once '../vendor/autoload.php';

chdir(dirname(__DIR__));

$progressBar = new ProgressBar(new JsPull());
-----------------------------------------------------------------------

Thanks and best regards,

Ralf

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]