Can I automatically save PHP generated pages as HTM?
I converted most of the pages on my site to PHP to make updating simpler using includes. Then I discovered that Google and Yahoo had dropped the pages from their indexes because the pages were being generated on the fly.
Is it possible to have a PHP program which would read in .PHP filenames from a text file, build pages from the PHP code and automatically save the built page on the server as HTM with the same filename with a .HTM extension.
For example, if the text file has a line /mydir/mypage.php the program should automatically create /mydir/mypage.htm, overwriting an existing file if present.
It wont work for mine, can you please look at it.
Hi,
I got dynamic website in php. it returns images and contents when hit on some page.
When i run this script it give me this error,
Warning: main(index.php ): failed to open stream: No such file or directory in /mnt/w0401/d04/s45/b0225e10/www/test/dynamic.php on line 5
Warning: main(index.php ): failed to open stream: No such file or directory in /mnt/w0401/d04/s45/b0225e10/www/test/dynamic.php on line 5
Warning: main(): Failed opening 'index.php ' for inclusion (include_path='.:/usr/local/nf/lib/php') in /mnt/w0401/d04/s45/b0225e10/www/test/dynamic.php on line 5
It says error on line 5 here " include ($files[$i]);"
can you please help me how can i run this script working. I want to run is ASAP
thanks in advance
How to remove numbers from file then save it
Hi again,
Come accorss other issue while solving it. SO need your suggestion again.
I can remove spaces using trim function,
PHP Code:
include (trim($files[$i]));
But Suppose if file name is index2.php, then how can I remove space and (OR only number) number so that I can save file as index.html
comes across strange issue
Hi everyone,
While running this script for the website I come across one new issue.
I have found solution by using ereg_replace method to remove number from filename.
But new issue come accross while testing site from last 2-3 days.
When I run this script then It get all data from index.php files and save that data as index.html file. But I have seen 3-4 times that once I created the index.html file all data get changed without running script again and it happened 3-4 times.
Also data I get is different than compare to data I usually get on running script.
This is very bad news because if I update file and leave running the website as default index.html page then users on website cant see what it should be displayed on website.
So question from above all programmers, might be you passed through this error. can you please explain about this bit and solution.
thanks in advance
imi