Ionic Framework unable to change content src from index.html to index.php - ionic-framework

I am new in Ionic Framework.
So via ionic cli i started a new app with blank template to run in android platform.
What i wanted to do is to replace the index.html with index.php in my app's folder that ionic cli automatically created for me.
So i moved into the www folder of my app i deleted the index.html file and instead i created an index.php file, then i moved into config.xml file and i changed the content src to points in the index.php file instead of index.html.
The problem is that i get this error in the browser:
Error: ENOENT: no such file or directory, open 'C:\Users\user\cmsApp\www\index.html'
and seems that my app still points to the default index.html (that doesn't exists anymore) instead the php one that i replaced with.
How can i fix that?
Thank you in advance!!!

You can try to modify the config file located here :
/PathOfYourProject/Config.xml
There is a part where you can change the source :
<content src="index.html"/>
But i'm not sure that you can place PHP file here.

Related

Flutter web located in a server folder

I have recently upload a flutter website inside of a folder in my server.
But it's not working well. I have notice that main.dart.js needs to have the folder name in the url. But It is not working well... What more things I have to change for running the website without more problems?
Try adding the base path to you're index.html.
Example:
<base href="/FolderName/">

FireBase not hosting index.html

So I have followed all the steps and I am sure my steps are correct but still firebase is not hosting my index.html. it is showing default index.html which doesn't even exists. I have only index.html under my root folder and no matter how many times I do 'firebase init', it says that the project is hosted but no json file or dist file or any other file is ever created.
firebase login
firebase init
your-build-command-here
firebase deploy
Tried all the above steps but didnt work. Need some help.
Put your html into a public/index.html directory
and type n when firebase asked you to override your index.html file
follow the steps given in below Url.
https://medium.com/#aleemuddin13/how-to-host-static-website-on-firebase-hosting-for-free-9de8917bebf2
you try these fixes as well.
Firebase not running index.html file

How to copy file from applicationStorageDirectory into dataDirectory?

I would like to copy an image file located in www/assets/imgs/christmas.jpg to the dataDirectory folder using the Ionic Native File Plugin, however I don't know how to access the www folder. I tried the following:
this.file.checkFile(this.file.applicationStorageDirectory, 'assets/imgs/christmas.jpg')
But it always returns NOT_FOUND_ERR.
You should change applicationStorageDirectory to applicationDirectory (although I am not sure what the difference is) and add www in front of the file path as the application directory contains the www folder and not its contents. So instead of assets/imgs/christmas.jpg use www/assets/imgs/christmas.jpg

Ionic 2 www empty folder

I am trying to test a sample Ionic2 app. I have started using ionic start AppName --v2.
Got the code in local with src folder. But the www folder is empty. When I do ionic serve, its opening the app in browser and throws the below error.
Error: ENOENT: no such file or directory, open 'path\to\folder\www\index.html'.
www folder is not getting updated with the compiled code. Nor build folder is getting generated inside the src folder. I have typescript and other compilers installed as well.
Try re-installing ionic framework, and making sure your CI is updated.
It could also be a permission issue, have you tried using sudo ?
sudo ionic start AppName tabs --v2 --ts
also make sure you are at the root of your application when running
ionic server

Resource in www not found

I am developing an mobile application using ionic framework. However, I got the error message file:///modules/moduleName/view/modal.html not found after i deploying to mobile app. I instantiate it as follow in the controller.
$ionicModal.fromTemplateUrl('../../../modules/moduleName/view/modal.html');
where modules is in www directory.
If your project structure is like below:
PROJECT_NAME
www/
modules/
moduleName/
view/
modal.html
...
index.html
...
You should just use $ionicModal.fromTemplateUrl('modules/moduleName/view/modal.html'); wherever your controller is. The path to your project file should be relative to index.html.