Hi,
Maybe you can try the wpmvc.bat ?
“Using the utility on a Windows machine
If you are using a Windows machine, you can run the DOS version of this utility by replacing ./wpmvc with wpmvc.bat in the commands in the following sections. You’ll need to cd into the wp-mvc directory first, though:
cd path\to\plugins\wp-mvc”
Source: http://wpmvc.org/documentation/creating_plugins/generating_code.html
Thread Starter
erisal
(@erisal)
Hi,
I’ve already do it and all that’s in the documentation.
But thanks for your reply.
Hi,
can you call >php -v
?
If you dont get current php version and further infos, it seems your PHP path is not globaly(system variables) known. Or there is a other reason wy php can not be executed the way you use it.
Thread Starter
erisal
(@erisal)
Yes I can call >php -v :
PHP 7.2.10 (cli) (built: Sep 13 2018 00:48:27) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
I’m sorry to say Windows installations aren’t very well supported these days. However, if you would like to contribute an improvement for Windows servers to the codebase, that is always welcome: https://github.com/tombenner/wp-mvc
@erisal Check if mysql is running. Or else, you’ll see a html output which contains ‘Database Error’
is there any example of redirection with this framework (like header(‘location:…’) in native PHP,
Thank you
Thank you very much @robertpeake
Hi,
I have three questions please :
1-
I defined validations for the fields of the model, Like below :
class Student extends MvcModel {
var $validate = array(
'url' => array(
'rule' => 'url',
'required' => false,
'message' => 'Please enter a valid URL in the URL field!'
)
);
My question is : How to get the message and display it to the front End user?
2-
What’s the best practice to use the mvc_css_url() function to link a CSS style sheet (for example Bootstrap from a CDN or a Bootstrap local file), in a front view ; and can I put a <head> </head> tags in the front view Like this :
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo mvc_css_url('my_plugin', 'datatable');?>"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.js"></script>
</head>
<h2>List of students</h2><br>
3 Upload of file :
is there any validation rule for Files in wpmvc (type and size),
Best Regards,
TSMM Teacher
Hi @robertpeake,
I have three questions please :
1-
I defined validations for the fields of the model, Like below :
class Student extends MvcModel {
var $validate = array(
'url' => array(
'rule' => 'url',
'required' => false,
'message' => 'Please enter a valid URL in the URL field!'
)
);
My question is : How to get the message and display it to the front End user?
2-
What’s the best practice to use the mvc_css_url() function to link a CSS style sheet (for example Bootstrap from a CDN or a Bootstrap local file), in a front view ; and can I put a <head> </head> tags in the front view Like this :
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo mvc_css_url('my_plugin', 'datatable');?>"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/datatables.min.js"></script>
</head>
<h2>List of students</h2><br>
3- Upload of files :
is there any validation rules for Files in wpmvc (type and size),
Best Regards,
TSMM Teacher