I want to read and display something from the database on the DataLife Engine homepage with php script.
Something like the last few news shows.
But when I call the file containing the PHP script inside the DataLife Engine template files (with the .tpl extension) (like this:{include file="test.tpl"}), this script don't work and don't show anything.
when I call the php file like this ({include file="test.php"}) in .tpl files, Data-Life-Engine show me an error with this description: Include files from root directory is denied.
Please help me to use a PHP script in the DataLife-Engine template file.
Thanks
first you must put your PHP file in the path "engine/modules".
Then call it in your template file as follows:
{include file="engine/modules/TEST.php"}
Related
I have been generating documentation with Docfx and everything works fine. Docfx generates .html files which is as expected.
However, since html files an be embedded in php files, I am looking for a way to generate the files as .php files rather than .html which I don't find any information.
I need this feature because I use a PHP templating engine in my application and I wanted to insert template variables in the markdown files for PHP to resolve dynamic values when being loaded in browser.
If this is possible, I would want a guide on how to do this. For instance, if I could locate and modify the file extension in the source code where the files are created.
Thanks in advance.
There's no build-in feature for that. Since I ran into the same problem today, here's a small workaround to archive that (sample in powershell):
$destinationRoot = "path/to/doc"
[RegEx]$Search = '(\.html)"'
$Replace = '.php"'
ForEach ($File in (Get-ChildItem -Path $destinationRoot -Recurse -File)) {
(Get-Content $File.FullName) -Replace $Search,$Replace |
Set-Content $File.FullName
}
After that you have to rename the files via script, too (it's not part of that script). You can archive that via modify the Set-Content $File.FullName command. You may wish to delete the old file, too.
Keep in mind it will replace links in the content, too, if they end with .html", but pages normally will not end with that extension, so it's an acceptable trade-off. If you really ran into that problem, just append a # or something else to the URL.
I am working on a wordpress plugin, I have an external php file that I need to use It should be placed in the Wp directory "http://localhost/forever/"
(where my wp files are uploaded).
For some reason I need to put this php file in an other folder but it should act like it's in Wp directory like changing its real path.
I've a PhpStorm file watcher running autoprefixer. However the file watcher runs recursively. I think this is because it generates a new css file which the file watcher then runs on.
Is there a way to force them to run only once?
I think I need a scope of Project files because I am not directly editing the css file, instead I have a SCSS file that creates a CSS file which should then be auto prefixed. My settings are shown below.
You have to:
create custom scope (Settings | Scopes .. or by clicking on corresponding "..." button in File Watcher);
[optionally] include desired files (e.g. *.css) -- not really required as "File Type" field of File Watcher already covers it
exclude already modified files (*.min.css)
Now use that scope in your File Watcher instead of default "Project Files"
Excluding directories from the Scope using a custom scope also works. This example is from a Symfony2 project.
I build a form under Admin Tab in orangehrm-3.1.1 and used commands symfony doctrine:build -model and forms for displaying the form.I created js files for that form.when I want to save form data in database,It was not saving,It was not accessing js file.should I have to run any command for that?Any suggestion would be of great help for mme
Where do you put your js files?
If it's under plugin's web/js folder, try this command php symfony orangehrm:publish-assets
and in your template add this code:
use_javascript(plugin_web_path('[YOUR_PLUGIN_NAME]', 'js/[YOUR_JS_FILE]'));
Have you checked file permission of js file folder?
If it is under symfony/web/js then just use
use_javascript(plugin_web_path('', 'js/yourjsfile.js'));
In my openx directory
openx/www/image
I have a php file that looks like c7dc84ecdf4fee7.php
Should this file be there? or its a malicious file?
By Default openx/www/images contains ,
openx/www/images/layerstyles/*
openx/www/images/robots.txt
openx/www/images/1x1.gif
Only Image Banners will be stored here .
.php maybe malicious code
Immediately remove that .php file