ronmarasigan / pip Goto Github PK
View Code? Open in Web Editor NEWA tiny PHP application framework.
Home Page: https://pinoywap.org
License: MIT License
A tiny PHP application framework.
Home Page: https://pinoywap.org
License: MIT License
Hi
i get this on using PIP
"Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead"
how much important is this message?
how can i change it to using PDO or mysqli instead?
why u don't fix this?
I downloaded it thinking it may help me understand some basic MVC concepts. -- that is not what happened. Better change the name from PIP to "Frameworks the bad way"
Rather than mysql_ functions, recommend PDO
Hi,
PHP 7 has reserved keyword "error". Please change Error Class to something else and similarly meaningful
Hi, I'm using the framework, I like it because it's simple.
I have a problem:
What happens if I don't receive a parameter in a function? I selling error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Usuario::restablecer(), 0 passed in C:\laragon\www\lidcon\system\pip.php on line 176 and exactly 1 expected
I tried to validate if the variable is defined but still I have the same error
Hi,
First of all this is a great tiny framework for PHP. I am using it with a small project that I am working on, which is planned to run on a Raspberry PI.
The issue I would like to report is that you should specify that the apache virtual host/config file that is used for PIP should specify AllowOverride ALL in directory section of the configuration for controller/method/param URL segments to work. I hope you will include this in the manual you got for PIP, will save time for someone else...
Ex:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName xxxxxxx
ServerAlias xxxx xxx
DocumentRoot /home/xxxxx/Projects/grooveshark/
<Directory /home/xxxxxx/Projects/grooveshark/>
Options FollowSymLinks
AllowOverride ALL
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
How can we get instance in helpers and plugins ?
How do I integrated PIP with twig?
I want to replace current render() view with twig render
just by calling $template = $this->loadTemplate('index.html');
instead calling
$loader = new Twig_Loader_Filesystem(ROOT_DIR .'application/views/');
$twig = new Twig_Environment($loader);
$template = $twig->loadTemplate('index.html');
Thanks
Hello,
I am using this framework to build a slightly-more-than-trivial website, so I need a stronger folder organization.
I implemented a way to handle nested controllers (as in inside folders on the 'controllers' folder) nativelly, with this code:
public function loadController($controller, $action = "index")
{
require(APP_DIR . "controllers/" . $controller . '.php');
$controller_name = end(explode("/", $controller));
$controller = new $controller_name;
$controller->$action();
}
This, besides calling controllers programmatically, can also handle nested controllers, that will not be accessible through a URL (such as headers, footers, views that depend on others...).
I added it to the controller class, where it fits me, but I guess it could also be a native helper.
I'm not sure if you think this is a good call though. But for the way I like to organize things, this suits me really well.
Do you see any problem with this approach? I tested it and it seems to not break anything, keeping the 'original API' untouched.
P.S. - I also added this to helpers and models in pip.php as they are instanciated with the 'new' keyword. I did not add it to controllers there because it would lead to weird behaviours with the URL and would loose the beautiful simplicity it has.
public function loadModel($name)
{
require(APP_DIR .'models/'. strtolower($name) .'.php');
$model_name = end(explode("/", $name));
$model = new $model_name;
return $model;
}
public function loadHelper($name)
{
require(APP_DIR .'helpers/'. strtolower($name) .'.php');
$helper_name = end(explode("/", $name));
$helper = new $helper_name;
return $helper;
}
NOTE: The plugin and view loader already handle this nativelly, because of they way they are implemented.
Thanks!
it shows me an error
Hi, this is not an issue, rather it is a pull request, but did not know how to add it. I apologize.
I love this framework because it is a basis for any project and is very light.
It would be great to add a suffix to the friendly url.
For example:
http://mysite.com/about/index.php
http://mysite.com/about/company.php
or
http://mysite.com/about/index.html
http://mysite.com/about/company.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.